From c916bd5945a660586421d1b6a71e84e8929b135f Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 19 Feb 2024 10:50:35 +0100 Subject: [PATCH] refs #6863 fix: VnSelect + url, VnLocation --- src/components/common/VnLocation.vue | 12 +++++------- src/components/common/VnSelectFilter.vue | 16 ++++++++-------- .../invoiceIn/invoiceInBasicData.spec.js | 6 ++---- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index b55706ad2..446bb371e 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -50,7 +50,10 @@ const value = computed({ return $props.modelValue; }, set(value) { - emit('update:modelValue', value); + emit( + 'update:modelValue', + postcodesOptions.value.find((p) => p.code === value) + ); }, }); @@ -101,16 +104,11 @@ function handleFetch(data) { :label="t('Location')" :placeholder="t('Search by postalcode, town, province or country')" @input-value="locationFilter" - :default-filter="true" + :default-filter="false" :input-debounce="300" :class="{ required: $attrs.required }" v-bind="$attrs" - emit-value - map-options - use-input clearable - hide-selected - fill-input >