getTabs in a widget - is that possible? How?
I have a Table Widget which displays some data. I want to get the active Filter to manage a query.
I found https://filamentphp.com/docs/3.x/tables/filters#injecting-the-current-filter-instance but I don't know if this is what I need.
How may I implement it correctly?
6 Replies
This is my widget. For now, $year = now()->year; sets the Filter hard to this year. But I want to get the active filter
Wow, I think Discord ate my opener text π
I found this: https://filamentphp.com/docs/3.x/tables/filters#injecting-the-current-filter-instance
I want to get the active set filter and use it for the query to get the necessary query data
ok, I found Tabs https://filamentphp.com/docs/3.x/panels/resources/listing-records and implement the getTabs(); but it doesn't show π¦
Filament Examples
Tabs Over the List Table
Some resources might have too much information to display. In that case - we can use Tabs to filter them out for our users. Also, did you know you can have count badges on tabs?
thank you
I added
without any query and removed the filter to test if Tabs are shown up but they don't π¦
Ok, I found out that I have to implement the getTabs() in the ListResource
But my widget doesnt have a ListResource. The widget is shown at the dashboard.
How to solve this?