Default Select

When I use a toggle to hide a select the default only works when creating a record. When editing the default is always the first option

Toggle::make('showStatus')->live(),

Select::make('status')
    ->default('published')
    ->selectablePlaceholder(false)
    ->visible(fn (Get $get) => $get('showStatus'))
    ->options([
        'draft' => 'Draft',
        'reviewing' => 'Reviewing',
        'published' => 'Published',
    ]),
Was this page helpful?