UiModal, which event is emitted when close button or outside is clicked?
See original GitHub issueIn version 1.0.1: Which is the event that is fired when the close is triggered for an UiModal? It seems that these 2 have the same purpose (by reading the docs):
close
Emitted when the modal is hidden (i.e. when the close transition completes).Listen for it using @close.
hide
Emitted when the modal close transition completes.Listen for it using @hide.
In version 0.8.9 I think I used @close
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to handle "outside" click on Dialog (Modal)?
In your Dialog tag remove the onClose event function. Then just add a button below let's say 'Cancel' then you can call function...
Read more >Click Outside Modal - Beginner JavaScript - Wes Bos
We will work on clicking the button on each card now, starting by selecting them. Then we will loop over each of the...
Read more >wire-elements/modal: Livewire component that provides you ...
To open a modal you will need to emit an event. To open the EditUser modal for ... By default, the modal will...
Read more >How to build modals with Laravel and Livewire - Philo's Blog
The modal will close if you click outside the modal or hit the escape key. It's also possible to close the modal using...
Read more >Options popup gets closed if user clicks/hovers outside
Is there a way we can do this in Flex Monster 2.8 and allow popups to close only by clicking on Apply/Cancel button?...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @EmilMoe,
Currently, the way the modal is opened/closed is by adding a
ref
to the modal and then calling theopen()
method on it.It doesn’t use
v-show
. Thehide
/close
events are used for doing something after the modal is opened or closed.Here’s an example:
See here for a working demo: https://codepen.io/JosephusPaye/pen/OxgrBZ?editors=1010
Updated docs to explain difference between
open
/reveal
andhide
/hidden
in https://github.com/JosephusPaye/Keen-UI/commit/10b27ac968f8cc0912abb36c5c710db7229d4e5d