FilamentF
Filament15mo ago
Kaaiman

SelectFilter default not working

I am trying to set a default value on my SelectFilter:
SelectFilter::make('status')
    ->multiple()
    ->options(RefundStatus::class)
    ->default(RefundStatus::Pending),


This is about the same as in the docs, instead the docs use a string value.
Solution
Make sure you use RefundStatus::Pending->value.
Was this page helpful?