F
Filament9mo ago
hxn

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
hxn
hxnOP9mo ago
No description
toeknee
toeknee9mo ago
->formatStateUsing(fn($state) => ) on the address input
hxn
hxnOP9mo ago
Thanks for your reply @toeknee What i'm supposed to do with formatStateUsing? How do I target the specific address input and disable it?
toeknee
toeknee9mo ago
You add it to the TextInput where the value is? then if is object return the options?
hxn
hxnOP9mo ago
All i have is two KeyValue component Forms\Components\KeyValue::make('company'), Forms\Components\KeyValue::make('company.address'),
Want results from more Discord servers?
Add your server