SelectFilter::make('type')
->default()
->visible(function () {
$shouldShowFilter = ($this->activeTab === 'all');
if (! $shouldShowFilter) {
$this->tableFilters['type']['value'] = null;
}
return $shouldShowFilter;
})
->options([
'open' => 'Open',
'closed' => 'Closed',
])
->relationship('status', 'type'),
SelectFilter::make('type')
->default()
->visible(function () {
$shouldShowFilter = ($this->activeTab === 'all');
if (! $shouldShowFilter) {
$this->tableFilters['type']['value'] = null;
}
return $shouldShowFilter;
})
->options([
'open' => 'Open',
'closed' => 'Closed',
])
->relationship('status', 'type'),