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:
Tables\Actions\ReplicateAction::make()
                    ->form([
                        Forms\Components\Fieldset::make()
                            ->schema([
                                Forms\Components\Toggle::make('prices')
                                    ->default('true'),
                            ])
                    ])


Result:
image.png
Solution
try
Tables\Actions\ReplicateAction::make()
    ->mountUsing(fn (\Filament\Forms\ComponentContainer $form) => $form->fill())
    ->form([
        Forms\Components\Fieldset::make()
            ->schema([
                Forms\Components\Toggle::make('prices')
                    ->default(true),
            ])
    ])
Was this page helpful?