KeyValue set key to be treated as a string

Currently if you have KeyValue field and you enter a string with a dot (.) in as a key value, you get an error: Filament\Forms\Components\KeyValue::{closure:{closure:Filament\Forms\Components\KeyValue::setUp():58}:60}(): Argument #1 ($value) must be of type ?string, array given Is it possible to set that key is treated as string not array?
Solution:
To answer my own problem. I extended KeyValue field and make it more "safe": https://github.com/BostjanOb/filament-safe-key-value
GitHub
GitHub - BostjanOb/filament-safe-key-value: A safe key-value compon...
A safe key-value component for Filament Forms. Contribute to BostjanOb/filament-safe-key-value development by creating an account on GitHub.
Jump to solution
1 Reply
Solution
Bostjan
Bostjan5mo ago
To answer my own problem. I extended KeyValue field and make it more "safe": https://github.com/BostjanOb/filament-safe-key-value
GitHub
GitHub - BostjanOb/filament-safe-key-value: A safe key-value compon...
A safe key-value component for Filament Forms. Contribute to BostjanOb/filament-safe-key-value development by creating an account on GitHub.

Did you find this page helpful?