Remove "Active filters" bar from table

Is there a way to remove the "Active filters" bar from a resource table other than CSS?
No description
9 Replies
DrByte
DrByte11mo ago
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?
DrByte
DrByte11mo ago
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-L261
GitHub
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
binaryfire
binaryfireOP11mo ago
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...
DrByte
DrByte11mo ago
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()
binaryfire
binaryfireOP11mo ago
I’d like to completely hide the bar on certain resource’s tables. CSS works but it’d more performant to disable it.
DrByte
DrByte11mo ago
Thanks for submitting the PR to add this!
CappaS
CappaS10mo ago
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
binaryfire
binaryfireOP10mo ago
Yep. All the info can be found in the Filters docs
CappaS
CappaS10mo ago
Perfect!!! I updated my filament version Thanks
Want results from more Discord servers?
Add your server