diff --git a/src/runtime/components/elements/Dropdown.vue b/src/runtime/components/elements/Dropdown.vue index b9b3ca23..e33de4cd 100644 --- a/src/runtime/components/elements/Dropdown.vue +++ b/src/runtime/components/elements/Dropdown.vue @@ -40,7 +40,8 @@ import { } from '@headlessui/vue' import type { Ref, PropType } from 'vue' import type { RouteLocationNormalized } from 'vue-router' -import { ref, onMounted } from 'vue' +import { ref, computed, onMounted } from 'vue' +import { defu } from 'defu' import NuxtLink from '#app/components/nuxt-link' import Icon from '../elements/Icon.vue' import Avatar from '../elements/Avatar.vue' @@ -123,14 +124,13 @@ const props = defineProps({ }, popperOptions: { type: Object as PropType, - default: () => ({ - placement: 'bottom-end', - strategy: 'fixed' - }) + default: () => {} } }) -const [trigger, container] = usePopper(props.popperOptions) +const popperOptions = computed(() => defu({}, props.popperOptions, { placement: 'bottom-end', strategy: 'fixed' })) + +const [trigger, container] = usePopper(popperOptions.value) function resolveItemClass ({ active, disabled }: { active: boolean, disabled: boolean }) { return classNames( diff --git a/src/runtime/components/forms/SelectCustom.vue b/src/runtime/components/forms/SelectCustom.vue index 7b3cb6de..aad2f160 100644 --- a/src/runtime/components/forms/SelectCustom.vue +++ b/src/runtime/components/forms/SelectCustom.vue @@ -85,6 +85,7 @@