F
Filament11mo ago
Thijmen

Global widget filter is null

I have followed the docs to create a global widget filter. My dashboard page has:
use HasFiltersAction;
protected function getHeaderActions(): array
{
return [
FilterAction::make()
->form([
DatePicker::make('startDate')
->label('Startdatum')
->default(now()->startOfYear()),
DatePicker::make('endDate')
->label('Einddatum')
->default(now()->endOfYear()),
])
];
}
protected function getHeaderActions(): array
{
return [
FilterAction::make()
->form([
DatePicker::make('startDate')
->label('Startdatum')
->default(now()->startOfYear()),
DatePicker::make('endDate')
->label('Einddatum')
->default(now()->endOfYear()),
])
];
}
On my widget class i dd() the filters like this: dd($this->filters); But it keeps saying null. If i apply the filters in the slideover it still says null/
1 Reply
EsTehKampoel
EsTehKampoel9mo ago
have you imported
InteractsWithPageFilters
InteractsWithPageFilters
trait?
Want results from more Discord servers?
Add your server