Akryum / Akryum/floating-vue

v-popover not opening/closing properly

Aberta
#760 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
3.5k
Forks
341
Merge médio
14min
PRs com merge (30d)
8

Descrição

Hello,

**FAILS:**
v-popovers do not clear or open as expected. It takes multiple clicks to achieve correct state, and it's sometimes two popovers appear at once.
[https://codesandbox.io/s/vue-js-popover-forked-bb608?file=/src/components/Flyout.vue](https://codesandbox.io/s/vue-js-popover-forked-bb608?file=/src/components/Flyout.vue)

**WORKS:**
[https://codesandbox.io/s/vue-js-popover-forked-wtu0p?file=/src/components/Flyout.vue](https://codesandbox.io/s/vue-js-popover-forked-wtu0p?file=/src/components/Flyout.vue)
Here, we use a plain `v-if` on the content slot based on the `show` prop we pass from the menu... but is this safe to do? Is it a coincidence that everything seems to work, but underneath there are still popovers not behaving properly?
``

**QUESTION:** Is there any problem using `v-if` on the v-popover content slot? Is the popover actually still "open" even if the content slot is hidden?

More details:
-We use a "Flyout" component to wrap v-popover
-We generate a unique ref per popover; maybe not needed, but safer
-We are changing state on menu items, and using v-click-outside

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.