Sven
Default Key-Value when creating a new record
The first thing I have tried was hook into the afterStateUpdated method of a TextInput field and set the value of the KeyValue with an empty array:
The second thing I have tried was use the default method on the KeyValue field:
`
While the the above default values get shown inside of the KeyValue field, I am getting the following error when submitting the resource form: Filament\Forms\Components\KeyValue::Filament\Forms\Components{closure}(): Argument #1 ($value) must be of type ?string, array given
However, when I manually add the above values, the form submits succesfully and the values get saved as an array inside of my database.
8 replies