-
I was not able to find a solution to this yet. I'd like to close any open modal either from a global javascript, or another Livewire component ( Calling Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@MrMooky I think |
Beta Was this translation helpful? Give feedback.
-
I'm trying to do the same thing but keep getting an error. I want to have a generic close button in the top right of the modal that will work across ALL modals. Something like this. modal.blade.php
I have a modal that displays a mini FAQ; when I close the FAQ modal I receive the following exception
I have tried the following but none have worked; I continue to receive the error
Is this not possible? |
Beta Was this translation helpful? Give feedback.
-
I got it working. <button type="button" onclick="Livewire.emit('closeModal', false)">
<i class="fas fa-times fa-lg"></i>
</button> If I did not include |
Beta Was this translation helpful? Give feedback.
@MrMooky I think
Livewire.emit('closeModal')
should do the trick 😄