mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
fix(Modal): wait for transition to complete to reset state (#1618)
This commit is contained in:
@@ -24,11 +24,13 @@ function _useModal () {
|
||||
isOpen.value = true
|
||||
}
|
||||
|
||||
function close () {
|
||||
async function close () {
|
||||
if (!modalState) return
|
||||
|
||||
isOpen.value = false
|
||||
}
|
||||
|
||||
function reset () {
|
||||
modalState.value = {
|
||||
component: 'div',
|
||||
props: {}
|
||||
@@ -53,6 +55,7 @@ function _useModal () {
|
||||
return {
|
||||
open,
|
||||
close,
|
||||
reset,
|
||||
patch,
|
||||
isOpen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user