fix: reset on click outside to close
This commit is contained in:
parent
2beee080bc
commit
720f8e645a
2 changed files with 4 additions and 2 deletions
|
|
@ -112,7 +112,9 @@ const file = ref<File | undefined>()
|
||||||
class="q-pa-md"
|
class="q-pa-md"
|
||||||
side="right"
|
side="right"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
v-click-outside="() => $emit('update:open', false)"
|
v-click-outside="
|
||||||
|
() => ($emit('update:open', false), reset(), (file = undefined))
|
||||||
|
"
|
||||||
:width="300"
|
:width="300"
|
||||||
:breakpoint="500"
|
:breakpoint="500"
|
||||||
:model-value="open"
|
:model-value="open"
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
||||||
class="q-pa-md"
|
class="q-pa-md"
|
||||||
side="right"
|
side="right"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
v-click-outside="() => $emit('update:open', false)"
|
v-click-outside="() => ($emit('update:open', false), reset())"
|
||||||
:width="300"
|
:width="300"
|
||||||
:breakpoint="500"
|
:breakpoint="500"
|
||||||
:model-value="open"
|
:model-value="open"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue