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 ```php public function updatedActiveTab(): void {...
Jump to solution
2 Replies
Solution
Jellibloom
Jellibloom9mo ago
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;
}
public function updatedActiveTab(): void
{
$this->tableFilters['status']['values'] = null;
}
Jellibloom
JellibloomOP9mo ago
the other half of the solution solved by this
Tables\Filters\SelectFilter::make('status')
->options(function (HasTable $livewire) {
$livewire->activeTab = null;
return Enums\ReservationStatus::class;
})
Tables\Filters\SelectFilter::make('status')
->options(function (HasTable $livewire) {
$livewire->activeTab = null;
return Enums\ReservationStatus::class;
})
Want results from more Discord servers?
Add your server