Action not working with requiresConfirmation()

Hello, I created a Livewire Component which implements HasForms and HasActions. I made a function "deleteAction" it works just fine but when adding requiresConfirmation(), I get the Modal but when pressing "confirm" nothing happens. I am pretty new to Filament and PHP in general. Here is the function code:
public function deleteAction(): Action
{
return Action::make('delete')
->action(function() {

error_log("TEST");
//Diagram::where('id', $this->diagram_id)->first()->delete();
})
->requiresConfirmation();
}
}
public function deleteAction(): Action
{
return Action::make('delete')
->action(function() {

error_log("TEST");
//Diagram::where('id', $this->diagram_id)->first()->delete();
})
->requiresConfirmation();
}
}
6 Replies
Leander
LeanderOP8mo ago
I now found an error which i dont know what to do with it: https://imgur.com/a/PBEVfbe
Dennis Koch
Dennis Koch8mo ago
I don't think ->requiresConfirmation() works on modals because we don't have stackable modals
Leander
LeanderOP8mo ago
as far as i know i am calling requiresConfirmation on a Action not a Modal the confirmation also pops up but the "confirm" button does not work
Dennis Koch
Dennis Koch8mo ago
Oh right. Sorry. Any error in the dev tools?
Leander
LeanderOP8mo ago
no nothing
Dennis Koch
Dennis Koch8mo ago
Did you include the <x-filament:modals component?
Want results from more Discord servers?
Add your server