diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 32fb83cbc..b28a09019 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -161,7 +161,7 @@ const arrayData = useArrayData(arrayDataKey, { searchUrl: false, mapKey: $attrs['map-key'], }); - +const isMenuOpened = ref(false); const computedSortBy = computed(() => { return $props.sortBy || $props.optionLabel + ' ASC'; }); @@ -184,7 +184,9 @@ onMounted(() => { if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300); }); -const someIsLoading = computed(() => isLoading.value || !!arrayData?.isLoading?.value); +const someIsLoading = computed( + () => (isLoading.value || !!arrayData?.isLoading?.value) && !isMenuOpened.value, +); function findKeyInOptions() { if (!$props.options) return; return filter($props.modelValue, $props.options)?.length; @@ -369,6 +371,8 @@ function getCaption(opt) { :input-debounce="useURL ? '300' : '0'" :loading="someIsLoading" @virtual-scroll="onScroll" + @popup-hide="isMenuOpened = false" + @popup-show="isMenuOpened = true" @keydown="handleKeyDown" :data-cy="$attrs.dataCy ?? $attrs.label + '_select'" :data-url="url" diff --git a/src/pages/Customer/components/CustomerFileManagementActions.vue b/src/pages/Customer/components/CustomerFileManagementActions.vue index 683f062ff..1fcafdccd 100644 --- a/src/pages/Customer/components/CustomerFileManagementActions.vue +++ b/src/pages/Customer/components/CustomerFileManagementActions.vue @@ -1,9 +1,9 @@