From 70dcadc57d58831ae7149be462536f22e00469cd Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 24 Oct 2024 11:52:13 +0000 Subject: [PATCH 1/2] Actualizar src/components/CreateNewPostcodeForm.vue --- src/components/CreateNewPostcodeForm.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 030ca1388..afd3fc025 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -108,11 +108,11 @@ watch( watch( () => postcodeFormData.provinceFk, - async (newProvinceFk) => { + async (newProvinceFk, oldValueFk) => { if (Array.isArray(newProvinceFk)) { newProvinceFk = newProvinceFk[0]; } - if (newProvinceFk !== postcodeFormData.provinceFk) { + if (newProvinceFk !== oldValueFk) { await townsFetchDataRef.value.fetch({ where: { provinceFk: newProvinceFk }, }); @@ -147,13 +147,7 @@ async function handleCountries(data) { auto-load url="Towns/location" /> - + Date: Thu, 24 Oct 2024 12:39:49 +0000 Subject: [PATCH 2/2] perf: remove limit --- src/components/CreateNewPostcodeForm.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index afd3fc025..03cba8ac7 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -214,7 +214,6 @@ async function handleCountries(data) { />