F
Filament17mo ago
Augus

V3 Tabs set default

Regarding to the Tabs for listing records (https://beta.filamentphp.com/docs/3.x/panels/resources/listing-records) is it possible to set an default tab that's not the first record? And if not how can i make a feature request to get this in?
3 Replies
Augus
AugusOP17mo ago
As an example i now got: public function getTabs(): array { return [ 'all' => Tab::make( 'Alle' ), 'active' => Tab::make( 'Actief' ) ->modifyQueryUsing( fn( Builder $query ) => $query->where( 'active', true ) ), 'inactive' => Tab::make( 'Inactief' ) ->modifyQueryUsing( fn( Builder $query ) => $query->where( 'active', false ) ), ]; } Where i wanna make the second tab as default.
LeandroFerreira
LeandroFerreira17mo ago
public ?string $activeTab = 'active'; ?
Augus
AugusOP17mo ago
O that works, thanks!
Want results from more Discord servers?
Add your server