Reordering new item on Repeater relationship throw error
When I add new item to the repeater and reordering, it throw error. This is not happened to existing item.
The error : Filament\Forms\ComponentContainer::getRawState(): Return value must be of type Illuminate\Contracts\Support\Arrayable|array, int returned
Solution:Jump to solution
Okay I solved this. The problem is because I am using action to modified the item, and missed how repeater populate their array. I just need to adjust 'key' for my newly added item. Here my updated code.
```php
->addAction(function (FormAction $action) {
return $action
->label('Add Shift')...
1 Reply
Solution
Okay I solved this. The problem is because I am using action to modified the item, and missed how repeater populate their array. I just need to adjust 'key' for my newly added item. Here my updated code.
This part solve it : $shifts["record-".$count+1] =