Skip to content

Commit a5e60b1

Browse files
committed
fix: allow dropdown menu not to be teleport
1 parent df10baf commit a5e60b1

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

app/components/Package/ManagerSelect.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
<script setup lang="ts">
22
import { onClickOutside, useEventListener } from '@vueuse/core'
33
4+
withDefaults(
5+
defineProps<{
6+
teleport?: boolean
7+
}>(),
8+
{
9+
teleport: true,
10+
},
11+
)
12+
413
const selectedPM = useSelectedPackageManager()
514
615
const listRef = useTemplateRef('listRef')
@@ -121,7 +130,7 @@ function handleKeydown(event: KeyboardEvent) {
121130
</button>
122131

123132
<!-- Dropdown menu (teleported to body to avoid clipping) -->
124-
<Teleport to="body">
133+
<Teleport to="body" :disabled="!teleport">
125134
<Transition
126135
:enter-active-class="prefersReducedMotion ? '' : 'transition-opacity duration-150'"
127136
:enter-from-class="prefersReducedMotion ? '' : 'opacity-0'"

0 commit comments

Comments
 (0)