Is there a way to trigger an action to launch a modal from the Livewire component class
Is there a way to trigger an action to launch a modal from the Livewire component class instead of triggering from a button?
10 Replies
So I have a livewire method that authenticates the user and on successful authentication, I want to show a modal with a form for further actions.
what code did you try?
maybe using
wire:init
?I was actually reading through this https://filamentphp.com/docs/3.x/actions/trigger-button
but I wasn't sure how to launch the modal from the Class
the authentication happens on the Livewire class and I need to launch the modal from there
is it a page action?
so, here is what I have
Not sure what to do on the
if
block
the login method is called on the wire:submit.prevent
of the blade
let me know if this makes sense
I was trying something like Action::make('')->mount()
are you using livewire3?
yes
I suppose you are using an Action on the Livewire component
Ok, let me give this a try and get back to you. Thank you