diff --git a/src/components/FormDialog.vue b/src/components/FormDialog.vue index dab9e7fc..ee1cea71 100644 --- a/src/components/FormDialog.vue +++ b/src/components/FormDialog.vue @@ -63,6 +63,7 @@ watch(provinceId, async (v) => { }); watch(districtId, async (v) => { + subDistrictId.value = undefined; await fetchSubDistrict(v); }); @@ -72,6 +73,15 @@ watch(subDistrictId, async (v) => { ?.filter((x) => x.id === v) .map((x) => x.zipCode)[0] ?? ''; }); + +watch(provinceId, (v) => { + if (v) { + addrOptions.value.districtOps = []; + addrOptions.value.subDistrictOps = []; + districtId.value = undefined; + subDistrictId.value = undefined; + } +});