0
0
Fork 0

feat: handle newValue

This commit is contained in:
Javier Segarra 2024-08-14 09:47:27 +02:00
parent 55b9cd9ff4
commit 8acd008f42
1 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import { useI18n } from 'vue-i18n';
import { ref } from 'vue';
const { t } = useI18n();
const emit = defineEmits(['update:model-value', 'update:options']);
const props = defineProps({
location: {
@ -39,7 +40,14 @@ function showLabel(data) {
:emit-value="false"
>
<template #form>
<CreateNewPostcode @on-data-saved="(newValue) => (modelValue = newValue)" />
<CreateNewPostcode
@on-data-saved="
(newValue) => {
modelValue = newValue;
emit('update:model-value', newValue);
}
"
/>
</template>
<template #option="{ itemProps, opt }">
<QItem v-bind="itemProps">