How do I open a modal from a header action?

Tried this:
protected function getHeaderActions(): array
{
return [
Action::make('configure')
->action(fn () => $this->dispatch('open-modal', id: 'statement-config'))
];
}
protected function getHeaderActions(): array
{
return [
Action::make('configure')
->action(fn () => $this->dispatch('open-modal', id: 'statement-config'))
];
}
Nothing happens. The modal is a livewire component. With it's own trigger button, so not sure the above is the right approach. I need to include it on the page, but I want the trigger button to be in the header.
0 Replies
No replies yetBe the first to reply to this messageJoin