F
Filament9mo 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
Saade9mo ago
$set('settings', ['apiKey' => '123'])
Steven
Steven9mo ago
Thanks, I realized that my target form component was missing reactive()!