Seeking Guidance on Setting Default Rows for KeyValue Component in FilamentPHP
I'm working on a Laravel project using FilamentPHP and I've encountered an issue with the KeyValue component. I'm trying to set default rows for this component but haven't been successful. Here's what I've tried so far:
KeyValue::make('test_key_value')
->default([
['key' => 'Test', 'value' => 'row1_value'],
['key' => 'row2_key', 'value' => 'row2_value'],
// Additional rows
]),
This code doesn't seem to work as I expected. The default rows are not being initialized as intended. I'm particularly interested in setting these default rows for editing existing records, not just for creating new records.
Could someone please provide insights or guidance on how to properly set default rows for the KeyValue component in this context? If there's a specific approach or a code snippet that works well for this scenario, I would greatly appreciate it.
Thank you in advance for your help!
0 Replies