Closed hamonCordova closed 2 weeks ago
Indeed, IIRC barely no event is documented currently so it's not just for <UModal>
I don't know if this is something planned for the next version, but as of now the best documentation is the code itself regarding events.
Also, note that when opening programmatically, you can add a listener for the close event when you open the modal
Also, note that when opening programmatically, you can add a listener for the close event when you open the modal
Could you give an example?
Sure, you can check this playground: https://stackblitz.com/edit/nuxt-ui-jcyjjx?file=app.vue
The second argument of modal.open
are the props and listeners of the components you are revealing. As this component must have <UModal />
as a root component, it "inherits" the props and listeners of <UModal />
You should have autocomplete for those normally:
Description
Today i was trying to find a way how i could know that a modal was closed (when opening programmatically). Then i discovered that existence of
onClose
emit, wich is fired automatically by the Nuxt UI, but the docs doesn't mention it.Additional context
No response