1
0

chore(popup): trigger close function directly

This commit is contained in:
Dominik Pschenitschni 2024-07-15 18:37:55 +02:00 committed by konrad
parent a114b9c8d3
commit b718aa1fbd

View File

@ -57,6 +57,9 @@ watchEffect(() => {
})
function close() {
if (!openValue.value) {
return
}
openValue.value = false
emit('update:open', false)
}
@ -69,12 +72,7 @@ function toggle() {
const popup = ref<HTMLElement | null>(null)
onClickOutside(popup, () => {
if (!openValue.value) {
return
}
close()
})
onClickOutside(popup, () => close())
</script>
<style scoped lang="scss">