FilamentF
Filament10mo ago
Batman

Setting default on select adds a second "Uncategorized" option

When I set the default on a SelectInput it adds the value in default to the options list. So after this there are two Uncategorized options. It is not eager loading, it is loading when you select the dropdown.

Select::make('category')
                            ->label('Category')
                            ->required()
                            ->preload()
                            ->searchable()
                            ->relationship('category', 'name')
                            ->default('Uncategorized'),
Was this page helpful?