Action is not called when first clicked on modal with modalContent()
Hi, I have a weird bug where I need to press twice on an action. The first time it does send a request to the server but it is not executing the action. Then every other click on whatever action does instantly open the action. It seems like the action is not loaded/mounted or something.
I have attached a video to explain the problem visually.
The modal opened is an action with a modalContent() where the content is a livewire component with a table. Any help would be appriciated!
6 Replies
It does work normally outside the modal, right? Don't have a solution but it feels like it's the Livewire component that you nested in that first modal
yes it does indeed work normally! And also correct it is a livewire component nested.
Do you think the issue lays there? And if so can I directly render the livewire component inside the modal?
Do you think the issue lays there?Would be my guess.
And if so can I directly render the livewire component inside the modal?That's what you are doing right? I mean yes via "modalContent" but it's still directly inside the modal
this is the action which I mount when the planning is clicked
And then the view uxit.deet.weekview.show-users which is rendered does directly add the livewire table component
weird thing is, when I add the mountUsing method to one of the actions inside the custom livewire table it does instanlty execute the method.
weird thing is, when I add the mountUsing method to one of the actions inside the custom livewire table it does instanlty execute the method.
this is the header action of the invite button. It does dd the value the first time clicked so I would assume it is mounted, it is just not executed
So might be the
requiresConfirmation()
?thought so to, but if I disable it, still needs 2 clicks
tried looking into the livewire returned object but could not really get any wiser 🥲
Some other ideas that someone has? Really stuck on this one…
Apperantly it does have to do with the requiresConfirmation... Dont know what I did last time. But I would like to have the user confirm their action. Any ideas why it is not mounting the modal of the confirmation?