Skip to content

Commit 2300f9d

Browse files
committed
fix: config provider around dropdown
1 parent df3273b commit 2300f9d

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

unraid-ui/src/components/common/dropdown-menu/DropdownMenuContent.vue

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import useTeleport from '@/composables/useTeleport';
33
import { cn } from '@/lib/utils';
4+
import { ConfigProvider } from 'radix-vue';
45
import {
56
DropdownMenuContent,
67
DropdownMenuPortal,
@@ -29,20 +30,21 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
2930
</script>
3031

3132
<template>
32-
<DropdownMenuPortal :to="teleportTarget as HTMLElement">
33-
<DropdownMenuContent
34-
v-bind="forwarded"
35-
side="bottom"
36-
:class="
37-
cn(
38-
'z-50 min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
39-
props.class
40-
)
41-
"
42-
>
43-
<div class="overflow-hidden">
44-
<slot />
45-
</div>
46-
</DropdownMenuContent>
47-
</DropdownMenuPortal>
33+
<ConfigProvider :scroll-body="true">
34+
<DropdownMenuPortal :to="teleportTarget as HTMLElement">
35+
<DropdownMenuContent
36+
v-bind="forwarded"
37+
side="bottom"
38+
:class="
39+
cn(
40+
'z-50 min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
41+
props.class
42+
)
43+
"
44+
>
45+
<div class="overflow-hidden">
46+
<slot />
47+
</div>
48+
</DropdownMenuContent> </DropdownMenuPortal
49+
></ConfigProvider>
4850
</template>

0 commit comments

Comments
 (0)