Skip to content

Commit

Permalink
fix(Popover): unable to toggle correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam-Chen committed Apr 12, 2024
1 parent c172546 commit cb6bb59
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ui/src/components/popover/Popover.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { nextTick, ref, computed, reactive, watch, provide } from 'vue';
import { vOnClickOutside } from '@vueuse/components';
import { onClickOutside } from '@vueuse/core';
import useScrollParent from '../../composables/scroll-parent/useScrollParent';
Expand Down Expand Up @@ -89,6 +89,14 @@ watch(
},
);
onClickOutside(
target,
() => {
flux.close();
},
{ ignore: [panel] },
);
provide('Popover', {
withinPopover: true,
});
Expand All @@ -105,7 +113,6 @@ provide('Popover', {
<div
v-if="typeof modelValue === 'boolean' ? defaultModel : flux.status"
ref="panel"
v-on-click-outside="flux.close"
tabindex="-1"
class="Popover-Panel"
:class="{
Expand Down

0 comments on commit cb6bb59

Please sign in to comment.