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;
                    }

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

Is there a way to do this?
Was this page helpful?