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 >