Repeater `defaultItems()` not works
The
Repeater
displayed empty until pressing the add button. I want to display a specific numbers. As I know it's by setting it like ->defaultItems(2)
but not works. Am I missing something?
3 Replies
are you on an edit page? I think this only works on create.
Add
$this->form->fill();
in the mount method. I was facing a similar issue recently and found the solution in GitHub: https://github.com/filamentphp/filament/discussions/2851
GitHub
->defaultItems(1) on Repeater did not show empty row Β· filamentphp ...
Package filament/forms Package Version 2.13.7 Laravel Version 9 Livewire Version 2 PHP Version 8.1 Bug description Repeater::make('Chapters') ->relationship('chapters') ->form...
@awcodes Yes, on the edit page that's why.
@devfaysal I'll try that. If not, then will make a custom page
Thanks guys
yep, it works ππ½