Can I show bulk action only when a specific filter is selected?

I think I can use the ->vissible and pass closure but not sure which params should I resolve in that Closure and how to use them to achieve this
2 Replies
Kenneth Sese
Kenneth Sese2y ago
You can do something like:
->visible(fn ($livewire) => $livewire->tableFilters['yourFilter']['value'] === 1))
->visible(fn ($livewire) => $livewire->tableFilters['yourFilter']['value'] === 1))
You might be able to do it with $this-tableFilters but if not then use livewire->tableFilters.
KarlisJ
KarlisJOP2y ago
Perfect, I'll try it once I get to that. Thank you!
Want results from more Discord servers?
Add your server