Target popperContainer with a ref

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This commit is contained in:
Phillip Rak 2025-01-15 15:29:50 -07:00
parent 929fa5666b
commit 6bb77d7861
1 changed files with 3 additions and 1 deletions

View File

@ -72,6 +72,7 @@ const setFocus = () => {
});
};
const popperContainer = ref(null);
const dropdownTarget = ref(null);
useClickOutside(dropdownTarget, () => showMenu(false));
@ -96,7 +97,7 @@ const applyShow = () => {
:triggers="[]"
:shown="isMenuOpen"
:auto-hide="false"
:container="'.popperContainer'"
:container="popperContainer"
@apply-show="applyShow"
>
<slot name="default">
@ -116,6 +117,7 @@ const applyShow = () => {
</template>
</v-dropdown>
<div
ref="popperContainer"
class="popperContainer"
@keydown.tab="showMenu(false)"
@keydown.escape="returnFocus"