caweren
Array of `Select` doesn't fill from state
I'm making a system that maps CSV columns to an existing table. For this i have a
TableMapping
model and resource with a single json
field (key-value pairs).
I have casted this field to object
in the model, my resource looks like this:
This all works fine, i get all the dropdowns, along with their options based on table column names.
But when i select a value, and save the mapping, and then refresh the browser page, all dropdowns goes back to the default state of "Select an option".
I have checked the DB, the values are saved correctly. If i dd($schema)
i can see the values are correctly hydrated into their appropriate dropdowns, it's just not filled in the view.
Anyone got any ideas?1 replies
Missing route parameter when editing resource
Hi all! Relatively new to Filament, coming from Nova.
I have a
Tenant
resource that spits out an error message when I try to edit them (Note, edit. Creation/deletion works fine).
It has 2 inputs, a name
(string) and a license_id
(select
, integer, refers to id
on licenses
table)
When ever I try to change anything in the resource, be it name or license, then it errors out with the following error message:
Looking through the trace, it seems to come from Livewires SupportBrowserHistory
feature> I've Googled around, but all the answers seems to be some of the more "obvious" once (like wrong parameter name in redirect
's etc.).
I haven't changed anything in the default Filament routing, and all other resources works correctly, it's only this one.
The primary
key type of Tenant
is a string
, and not and integer
- I don't know if this is relevant, but it's the only differing factor I can find.
I'm happy to supply any code you might want to check through, please let me know.17 replies