From 3c7880d02fa21885bff842da419e2d8531a3923b Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 30 Dec 2024 14:02:23 +0100 Subject: [PATCH] fix: zone events postcode select --- src/components/common/VnSelect.vue | 6 +++++- src/pages/Zone/ZoneDeliveryPanel.vue | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index e5ac05231..1cfe0a184 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -148,7 +148,11 @@ onMounted(() => { const arrayDataKey = $props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label); -const arrayData = useArrayData(arrayDataKey, { url: $props.url, searchUrl: false }); +const arrayData = useArrayData(arrayDataKey, { + url: $props.url, + searchUrl: false, + mapKey: $attrs['map-key'], +}); function findKeyInOptions() { if (!$props.options) return; diff --git a/src/pages/Zone/ZoneDeliveryPanel.vue b/src/pages/Zone/ZoneDeliveryPanel.vue index ccc7aab3f..0a535afcb 100644 --- a/src/pages/Zone/ZoneDeliveryPanel.vue +++ b/src/pages/Zone/ZoneDeliveryPanel.vue @@ -89,7 +89,7 @@ watch( v-model="formData.geoFk" url="Postcodes/location" :fields="['geoFk', 'code', 'townFk', 'countryFk']" - sort-by="code, townFk" + :sort-by="['code ASC']" option-value="geoFk" option-label="code" :filter-options="['code']" @@ -97,6 +97,7 @@ watch( dense outlined rounded + map-key="geoFk" >