Toggle in Action does not respect default state
I'm trying to customize the ReplicateAction on a table by showing toggles that allow the user to (de-)select data that is to be replicated. I want all the toggles to be on by default, but using
default(true)
on the toggles has no visible effect. They present as false
.
Code:
Result:Solution:Jump to solution
try
```php
Tables\Actions\ReplicateAction::make()
->mountUsing(fn (\Filament\Forms\ComponentContainer $form) => $form->fill())
->form([...
5 Replies
Does the ToggleButton component work for this? Just curious
First thing I tried 😄 no, it doesn't, unfortunately
Hmm weird then I guess it’s specific to all Boolean components? Did you try a button group with options yes and no, with default yes?
Solution
try
Thanks, that did it