From 70dcadc57d58831ae7149be462536f22e00469cd Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 24 Oct 2024 11:52:13 +0000 Subject: [PATCH] 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" /> - +