Multi dimensional KeyValue
Hello,
Is there an easy way to deal with multi dimensional array with the keyvalue component?
For now i got a [object Object] in the value. I can't even save the resource because the keyvalue awaiting a ?string
Maybe it is possible to ask filament to ignore the values if its an array?
Exemple of my data (casted as an array)
"{"name": "CompanyName", "address": {"country": "USA", "postcode": "44"}, "status": "ok"}"
5 Replies
->formatStateUsing(fn($state) => ) on the address input
Thanks for your reply @toeknee
What i'm supposed to do with formatStateUsing? How do I target the specific address input and disable it?
You add it to the TextInput where the value is? then if is object return the options?
All i have is two KeyValue component
Forms\Components\KeyValue::make('company'),
Forms\Components\KeyValue::make('company.address'),