diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index 6de402a26..cab4f98e9 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -2,7 +2,7 @@ import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; import VnSelectDialog from 'components/common/VnSelectDialog.vue'; import { useI18n } from 'vue-i18n'; -import { ref } from 'vue'; +import { computed } from 'vue'; import { useAttrs } from 'vue'; import { useRequired } from 'src/composables/useRequired'; const { t } = useI18n(); @@ -43,7 +43,7 @@ const formatLocation = (obj, properties) => { return filteredParts.join(', '); }; -const modelValue = ref( +const modelValue = computed(() => props.location ? formatLocation(props.location, locationProperties) : null );