-
PackageInfolist builder Package Versionv3.2.131 How can we help you?Hi, I love Filament and have built an app that uses schedules. I have a class ListSchedules that extends ListRecords and uses tabs for filtering of the table. Each tab has a badge with a count to show the records that apply to the tab filter. This all works great. What I cannot work out is how to get the original query from the ScheduleResource table that has other filters already applied. When selecting a tab, the table shows the records filtered using the ScheduleResource filters as well as the ListSchedules Tab filter, but I don't know how I can get the badge count to match the number of records. Below is the getTabs function of ListSchedules.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I finally found the solution: ->badge(fn () => $this->getFilteredTableQuery()->clone()->count()) Some of the filament methods are so hard to find. Is it worth starting to build a filament reference? |
Beta Was this translation helpful? Give feedback.
I finally found the solution: ->badge(fn () => $this->getFilteredTableQuery()->clone()->count())
Some of the filament methods are so hard to find. Is it worth starting to build a filament reference?