Remove "Active filters" bar from table
Is there a way to remove the "Active filters" bar from a resource table other than CSS?
9 Replies
Are you wanting to actually just hide the existence of that filter when applied? Or is it the only filter and you just never want any filter "indicators" to be displayed?
So ... I wonder if you can just override the
getFilterIndicators()
method on the table (defined via the HasFilterIndicators trait) to return something empty?
... because: https://github.com/filamentphp/filament/blob/876fd30c3117e11cea4c370d3601006129e30113/packages/tables/resources/views/index.blade.php#L257-L261GitHub
filament/packages/tables/resources/views/index.blade.php at 876fd30...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
Yeah I had a look at that. Ended up submitting a PR: https://github.com/filamentphp/filament/pull/10659
GitHub
Hide filter indicator bar by binaryfire · Pull Request #10659 · fil...
The active filters bar is sometimes redundant. Eg. when filters are displayed above the table, the state of each filter is already visible.
This adds a method which allows it to be disabled.
Withou...
OR ... if you have the ability to control the filter Indicator on ALL your filters, you could leave the indicator undefined, or blank, and then it won't get registered, so will not show. ie:
indicateUsing()
I’d like to completely hide the bar on certain resource’s tables. CSS works but it’d more performant to disable it.
Thanks for submitting the PR to add this!
Hey guys, is it working? hiddenFilterIndicators() or hideFilterIndicators()??
I read the PR but could understand if it is merged or not
and how to use it
Yep. All the info can be found in the Filters docs
Perfect!!! I updated my filament version
Thanks