How do I attach a livewire event to a Wizard's default action buttons?

The dispatch() and dispatchSelf() methods seem to do nothing. This code works, the ray() fires.
Wizard::make([
Step::make('Installer Details')
->afterValidation(function () { $this->updateModel(2); })
->schema([
Section::make('Installer Details')
->schema([
Actions::make([
Action::make('Print')->dispatchSelf('bandits'),
]),
...

#[On('bandits')]
public function bandits()
{
ray('here');
}
Wizard::make([
Step::make('Installer Details')
->afterValidation(function () { $this->updateModel(2); })
->schema([
Section::make('Installer Details')
->schema([
Actions::make([
Action::make('Print')->dispatchSelf('bandits'),
]),
...

#[On('bandits')]
public function bandits()
{
ray('here');
}
But this does nothing
->nextAction(fn (Action $action) => $action->dispatchSelf('bandits'))
->previousAction(fn (Action $action) => $action->dispatchSelf('bandits'))
->nextAction(fn (Action $action) => $action->dispatchSelf('bandits'))
->previousAction(fn (Action $action) => $action->dispatchSelf('bandits'))
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server