v4 Repeater issues (checkbox list & modal table select)

Hi all! So we're migrating a project from v3 to v4 and there we have a Repeater with a CheckboxList inside of it. Worked well in v3, but running into the 2 issues in v4; 1. CheckboxList in Repeater: selecting one option, automatically checks all options. So if you check one checkbox, everything gets selected 2. Couldn't find a way to mitigate this so I tried a ModalTableSelect instead. There seems to be a Repeater issue with this also as after selecting your records in the modal, there will be this error:
[previous exception] [object] (Error(code: 0): Call to a member function getStateSnapshot() on null at /Users/.../.../vendor/filament/forms/src/Components/Repeater.php:1203)
[stacktrace]
#0 /Users/.../.../storage/framework/views/507e3e175e09fa1712d31f23b293f28a.php(103): Filament\\Forms\\Components\\Repeater->getItemLabel('9d68c4b3-cec1-4...')
[previous exception] [object] (Error(code: 0): Call to a member function getStateSnapshot() on null at /Users/.../.../vendor/filament/forms/src/Components/Repeater.php:1203)
[stacktrace]
#0 /Users/.../.../storage/framework/views/507e3e175e09fa1712d31f23b293f28a.php(103): Filament\\Forms\\Components\\Repeater->getItemLabel('9d68c4b3-cec1-4...')
So; - Any else have issues with CheckboxList in Repeater or does it work well for you? - Any else have issues with ModalTableSelect in Repeater or does it work well for you?
1 Reply
LeandroFerreira
Repeater with CheckboxList looks great in v4. I'm on 4.2.4
Repeater::make('repeater')
->schema([
CheckboxList::make('categories')
->options([
'one' => 'One',
'two' => 'Two',
'three' => 'Three',
])
])
Repeater::make('repeater')
->schema([
CheckboxList::make('categories')
->options([
'one' => 'One',
'two' => 'Two',
'three' => 'Three',
])
])
You could provide a minimal repo on Github reproducing this issue

Did you find this page helpful?