F
Filament14mo ago
Steven

Set value of key-value field

Is it possible to programmatically set the value of a key-value field? I am trying to use ->afterStateUpdated() to do something like $set('settings', '{"apiKey": "123"}'); after an item is selected from a select field. But nothing happens! The value will populate a simple text-input field, but not a key-value. Is this possible?
2 Replies
Saade
Saade14mo ago
$set('settings', ['apiKey' => '123'])
Steven
StevenOP14mo ago
Thanks, I realized that my target form component was missing reactive()!
Want results from more Discord servers?
Add your server