From a327b2414e56a756f1e4289e1c6ddcc0bd3129a4 Mon Sep 17 00:00:00 2001 From: Wuriko Date: Sun, 15 Sep 2024 09:31:33 +0200 Subject: [PATCH] fix: fix popover placement --- .../components/NvMessengerAudioBar.vue | 2 + .../forms/Autocomplete/autocomplete.shared.ts | 66 +++++++++---------- .../overlay/Popover/popover.shared.ts | 2 +- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/apps/app/src/teams/messenger/components/NvMessengerAudioBar.vue b/apps/app/src/teams/messenger/components/NvMessengerAudioBar.vue index 0422c5ad..1601988b 100644 --- a/apps/app/src/teams/messenger/components/NvMessengerAudioBar.vue +++ b/apps/app/src/teams/messenger/components/NvMessengerAudioBar.vue @@ -27,6 +27,7 @@ data-v-step="engine-select" icon-name="direction" placeholder="Speech Engine" + placement="top-start" size="sm" @update:modelValue="(value) => settingsStore.$patch({ selectedSpeechEngine: value })" /> @@ -42,6 +43,7 @@ class="w-13" data-v-step="engine-voice-select" placeholder="Speech Voice" + placement="top-start" size="sm" /> diff --git a/packages/ui/src/components/forms/Autocomplete/autocomplete.shared.ts b/packages/ui/src/components/forms/Autocomplete/autocomplete.shared.ts index d6a1389f..a9d7314f 100644 --- a/packages/ui/src/components/forms/Autocomplete/autocomplete.shared.ts +++ b/packages/ui/src/components/forms/Autocomplete/autocomplete.shared.ts @@ -7,38 +7,38 @@ export type Size = (typeof sizeValues)[number] export const defaultWidth = 300 as const export const props = { - options: { - type: Array as PropType, - default: () => [], - }, - size: { - type: String as PropType, - default: 'md', - }, - estimateSize: { - type: Number, - default: tokens.spacing['7'], - }, - valueKey: { - type: String, - }, - placement: { - type: String as PropType, - default: 'bottom-start', - }, - visible: { - type: Boolean, - default: false, - }, - width: { - type: Number, - }, - autoScrollIndex: { - type: Number, - }, - selectOnTab: { - type: Boolean, - default: false, - }, + options: { + type: Array as PropType, + default: () => [], + }, + size: { + type: String as PropType, + default: 'md', + }, + estimateSize: { + type: Number, + default: tokens.spacing['7'], + }, + valueKey: { + type: String, + }, + placement: { + type: String as PropType, + default: 'bottom-end', + }, + visible: { + type: Boolean, + default: false, + }, + width: { + type: Number, + }, + autoScrollIndex: { + type: Number, + }, + selectOnTab: { + type: Boolean, + default: false, + }, } export type Props = ExtractPropTypes diff --git a/packages/ui/src/components/overlay/Popover/popover.shared.ts b/packages/ui/src/components/overlay/Popover/popover.shared.ts index 72d8b189..33963eaf 100644 --- a/packages/ui/src/components/overlay/Popover/popover.shared.ts +++ b/packages/ui/src/components/overlay/Popover/popover.shared.ts @@ -7,7 +7,7 @@ export type Size = typeof sizeValues[number] export const props = { placement: { type: String as PropType, - default: 'bottom-start', + default: 'bottom-end', }, size: { type: String as PropType,