© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Patrick

Show table action only when a specific filter is set

I would like to display a table action, but only when a specific filter is selected.

This works on the first request and there is a filter value in the GET:
Tables\Actions\Action::make('testactio')
                ->visible(function(){  
                    $filter = request()->get('tableFilters');
                    if(isset($filter['verplichte_cursus']) && $filter['verplichte_cursus']){
                        return true;
                    }
Tables\Actions\Action::make('testactio')
                ->visible(function(){  
                    $filter = request()->get('tableFilters');
                    if(isset($filter['verplichte_cursus']) && $filter['verplichte_cursus']){
                        return true;
                    }

But won't work when we select the filter after the page loads. I tried injecting
$get
$get
but it can't resolve that.

Is there a way to do this?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Show table row action only when filter is enabled
FilamentFFilament / ❓┊help
2y ago
Can I show bulk action only when a specific filter is selected?
FilamentFFilament / ❓┊help
3y ago
Table action only for specific row?
FilamentFFilament / ❓┊help
3y ago
Show only table options in the filter
FilamentFFilament / ❓┊help
3y ago