FilamentF
Filament3y ago
Remi

Render Single Table action on different place

My table has multiple TableHeaderActions. 1 want all of them on the place they render by default, except one. Which i want to render elsewhere.

So far i found
{!! Action::make('action')->requiresConfirmation()->action(fn() => dd('action works'))->toHtml() !!}


It renders the button where i want, but it doesnt work. Only when i add this button to the tableHeaderActions as well, it works. But then it is rendered in both places. It's like the modal doesnt render like this.

I tried to
@include(Action::make('action')->requiresConfirmation()->action(fn() => dd('action works'))->getView())

But that gives me errors about the $action variable not being set.

I get that the button i render has wire:click="mountTableAction('action')" and its not in de table action array. So is there a way to include it in the tableaction array, but not have it render with the rest?

Question:
How do i render 1 tableHeaderAction in a different place from the rest?
Was this page helpful?