Refresh badge count after filter table

Good morning, everyone! I have the following table with the tabs where there is a query for the badge count. The client wants that when he searches for someone in the table, the badge number reflects the result of the search. For example, if I searched for Alexandre and there are only 2 Alexandres in Active, I need to have the badge in 2 active ones, and in the rest 0.
1 Reply
charlie
charlie15h ago
try with something like:
->badge(fn () => $this->getFilteredTableQuery()->clone()->where('your_condition', true)->count())
->badge(fn () => $this->getFilteredTableQuery()->clone()->where('your_condition', true)->count())

Did you find this page helpful?