Action Modal on Simple Pages?
Hey, is there any way to add the ability to open modals on actions (such as confirmation modals) within a simple page?
I have extended the default Login / Register views, but no matter what I do, actions that should open modals just don't work.
5 Replies
I guess the modal components aren't included on the simple page.
I did add the
<x-filament-actions::modals>
component if you mean that. It's still not doing anything though. It just simply runs the action
instead of first confirming via a modal.Hm. I am not sure then, sorry.
No worries, thanks anyways. π
For other people who might stumble upon something similar, I think I finally found the issue, I had to pass a closure to the
action
method.
didn't work, but
did.
I'm pretty sure I tried that before already though, so I have no idea why it now works. πI had this issue and I found it was due to my action method name 'integrateActivityAction' didn't match the string in Action:make('integrateActivity').
The key part in source code is here:
if (
(! str($name)->endsWith('Action')) &&
method_exists($this, "{$name}Action")
) {
$methodName = "{$name}Action";
} elseif (method_exists($this, $name)) {
$methodName = $name;
} else {
return null;
}
(this is in getAction in IntertactsWithActions.php)