How to get the filters currently in use on a rendered table.

I'm trying to conditionally make actions visible based on the currently active filter on my table. This is in a livewire component with a filament table. I can't sort out how to determine if the only_trashed filter is active. I want to show the restore button and hide the deleted button, and vice versa, but am struggling with building the conditions for visible() on the action. I can find functions to determine the available filter options, but not the actual active filter.
No description
2 Replies
dodecadaedra
dodecadaedraOP11mo ago
Bump? sorry if i'm missing something stupidly obvious....
toeknee
toeknee11mo ago
Why not do it based on the record values? It would be: ->visible(fn() => !is_null($record->deleted_at)) to show if the deleted_at column is not null which means it has been deleted
Want results from more Discord servers?
Add your server