FilamentF
Filament3y ago
eazy

Dispatch on table row click

I want to dispatch a event when a Table row is clicked.
->recordAction(fn () => $this->dispatch('openFillAction'))

I tried using the recordAction but that doesn't seem to work. Is there another easy way I can do this?
Solution
Okay I fixed this 🥲 Its actually pretty easy but it took me so long somehow, maybe this function needs to be documented?

On your table you add:
->recordAction('sender')


And then in your livewire component you add:
    public function sender()
    {
        $this->dispatch('openFillAction');
    }
Was this page helpful?