How can I make my form action show a confirmation modal?
I have a form with a delete action. I want it to fire the doDelete() method when clicked. But I want a confirmation modal to show first. However the code below doesn't seem to work. When I click the button nothing shows.
If I take out the ->requiresConfirmation() then the doDelete() method is fired fine.
public function form(Form $form): Form { return $form ->schema([... Actions::make([ Action::make('delete') ->requiresConfirmation() // This doesn't make a modal show ->action(function () { $this->doDelete($this->item->id); }) ]), ]); }
public function form(Form $form): Form { return $form ->schema([... Actions::make([ Action::make('delete') ->requiresConfirmation() // This doesn't make a modal show ->action(function () { $this->doDelete($this->item->id); }) ]), ]); }