FilamentF
Filament2y ago
🍠

How to use same column attribute in a Table Filter AND in Listing records (Using tabs to filter)

Hello folks!
We want to display a status attribute in table filters, and in list getTabs method
but when filtering it's not working properly, as it filters data that has both status.

I want to apply one filter of them; when choosing one, remove the another

Here's how the url is displayed when choosing both filters
http://localhost:8000/admin/bookings?activeTab=Ready&tableFilters[status][values][0]=Ready

TIA
Solution
So I want to reset a specific filter on tab filter, and vise versa
I found the first have of the solution, on the list page I added this function
public function updatedActiveTab(): void
{
  $this->tableFilters['status']['values'] = null;
}
Was this page helpful?