[PR #1261] [MERGED] Add live() to KeyValue #1286

Closed
opened 2026-02-05 18:09:14 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/1261
Author: @rmartinoscar
Created: 4/14/2025
Status: Merged
Merged: 4/15/2025
Merged by: @rmartinoscar

Base: mainHead: issue/1260


📝 Commits (1)

📊 Changes

2 files changed (+2 additions, -0 deletions)

View changed files

📝 app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php (+1 -0)
📝 app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php (+1 -0)

📄 Description

Closes #1260
Follow up https://github.com/pelican-dev/panel/issues/164

FYI this is still an issue. The reason is that the key string is converted directly object access notation when sent over via Livewire. If your component is called "comp" and you have the KeyValue column called "keva" and your key is named "example" with a value of "true...yes", it will normally do comp.keva.example = "true...yes" - however if you have a "." in your key name (example.com), instead it will do comp.keva.example.com = "true...yes". I'm sure you can see where the problem is. This will cause a failure in the KeyValue component because it's looking for the Key's to be strings, but this casts it to an "array".

However you can easily bypass this issue for now and just add ->live() to your KeyValue component and Livewire's binding will appropriately cast example.com to a string "example.com".

https://github.com/filamentphp/filament/issues/12116#issuecomment-2097408424


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/panel/pull/1261 **Author:** [@rmartinoscar](https://github.com/rmartinoscar) **Created:** 4/14/2025 **Status:** ✅ Merged **Merged:** 4/15/2025 **Merged by:** [@rmartinoscar](https://github.com/rmartinoscar) **Base:** `main` ← **Head:** `issue/1260` --- ### 📝 Commits (1) - [`c5d9f63`](https://github.com/pelican-dev/panel/commit/c5d9f63da7bca49bbc6415f5af0b054cc0db88a2) Add `live()` to `KeyValue` ### 📊 Changes **2 files changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php` (+1 -0) 📝 `app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php` (+1 -0) </details> ### 📄 Description Closes #1260 Follow up https://github.com/pelican-dev/panel/issues/164 > FYI this is still an issue. The reason is that the key string is converted directly object access notation when sent over via Livewire. If your component is called "comp" and you have the KeyValue column called "keva" and your key is named "example" with a value of "true...yes", it will normally do `comp.keva.example = "true...yes"` - however if you have a "." in your key name (`example.com`), instead it will do `comp.keva.example.com = "true...yes"`. I'm sure you can see where the problem is. This will cause a failure in the KeyValue component because it's looking for the Key's to be strings, but this casts it to an "array". > > However you can easily bypass this issue for now and just add `->live()` to your KeyValue component and Livewire's binding will appropriately cast `example.com` to a string `"example.com"`. https://github.com/filamentphp/filament/issues/12116#issuecomment-2097408424 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 18:09:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#1286