How to access filter data from a widget?
I have a widget defined in
I have a date filter defined in my
I want to pass the current filter data (startDate and endDate) to the widget
GetHeaderWidgets on the List page of my resourceI have a date filter defined in my
table functionI want to pass the current filter data (startDate and endDate) to the widget
Solution
Inside that widget class you have to use InteractsWithPageTable:
and then you can get the filters with
Edit: I'm using Filament v4, so not sure if it's the same as in v3
and then you can get the filters with
$this->tableFiltersEdit: I'm using Filament v4, so not sure if it's the same as in v3