diff --git a/packages/tables/docs/04-filters/02-select.md b/packages/tables/docs/04-filters/02-select.md index 0c95359a25..783e3c4238 100644 --- a/packages/tables/docs/04-filters/02-select.md +++ b/packages/tables/docs/04-filters/02-select.md @@ -117,3 +117,29 @@ SelectFilter::make('status') ->default('draft') ->selectablePlaceholder(false) ``` + +## Applying select filters by default + +You may set a select filter to be enabled by default, using the `default()` method. If using a single select filter, the `default()` method accepts a single option value. If using a `multiple()` select filter, the `default()` method accepts an array of option values: + +```php +use Filament\Tables\Filters\SelectFilter; + +SelectFilter::make('status') + ->options([ + 'draft' => 'Draft', + 'reviewing' => 'Reviewing', + 'published' => 'Published', + ]) + ->default('draft') + +SelectFilter::make('status') + ->options([ + 'draft' => 'Draft', + 'reviewing' => 'Reviewing', + 'published' => 'Published', + ]) + ->multiple() + ->default(['draft', 'reviewing']) +``` +