open-admin
open-admin copied to clipboard
Sortable not defined by default on json column
Hi there, I hope everything is well!
When using a JSON column it submits perfectly fine etc
However when calling the $form->keyValue('your_column', 'Your Column') function it gives the following error
When chaining sortable() as the following
$form->keyValue('your_column', 'Your Column')->sortable(true|false) it works 100% and renders as expected
Of course a null wrapper can be used on the view but I'd prefer checking whats happening on the controller, I'm gonna look into it and will revert and present what I find
@open-admin-org
Ok I see the 'sortable' key is handled by a trait,
My suggestion is just a coalesce handler on the options['sortable'] check
This sorts the error
OpenAdmin\Admin\Form\Field\Traits\Sortable