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
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.public ?string $activeTab = 'active';
?O that works, thanks!