laravel-admin
laravel-admin copied to clipboard
List field: Not included in request if empty, entries stay
- Laravel Version: 8.83.5
- PHP Version: 8.0
- Laravel-admin: 1.8.18
Description:
I have a list() field to edit a 1-dimensional array of strings as described here: https://laravel-admin.org/docs/en/model-form-json-fields#One-dimensional%20array I fill it with some entries and save. Then I want to remove the items, but they stay and won't go away. I see in the network monitor of my browser that the field is not included in the request at all, and I guess that's why the (empty) content of the field is not being handled in the first place to remove the saved entries.
Steps To Reproduce:
- Add list() field to $form:
$form->list('sources')->max(10)->min(0);
- Add an item and save.
- Make sure the item has been saved.
- Edit again and remove item.
- Item is still there, no changes.