From 37af8ba8f55826538abeb56be6fc8b48c1cd0c53 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 18 Jun 2024 09:43:44 +0200 Subject: [PATCH 1/3] fix: refs #7598 fix evt & .value --- src/components/FormModel.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index dc3e585f6..792a0a791 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -84,7 +84,7 @@ const $props = defineProps({ description: 'It is used for redirect on click "save and continue"', }, }); -const emit = defineEmits(['onFetch', 'onDataSaved']); +const emit = defineEmits(['onFetch', 'onDataSav7ed']); const modelValue = computed( () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}` ); @@ -121,7 +121,7 @@ onMounted(async () => { if (!$props.formInitialData) { if ($props.autoLoad && $props.url) await fetch(); - else if (arrayData.store.data) updateAndEmit(arrayData.store.data, 'onFetch'); + else if (arrayData.store.data) updateAndEmit('onFetch', arrayData.store.data); } if ($props.observeFormChanges) { watch( From 9725874d5d8d3036f45d31077c184b29be30e45c Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 18 Jun 2024 09:44:50 +0200 Subject: [PATCH 2/3] fix: refs #7598 fix evt & .value --- src/components/FormModel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 792a0a791..d7f7f6b97 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -87,7 +87,7 @@ const $props = defineProps({ const emit = defineEmits(['onFetch', 'onDataSav7ed']); const modelValue = computed( () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}` -); +).value; const componentIsRendered = ref(false); const arrayData = useArrayData(modelValue); const isLoading = ref(false); From 024687e2d313063c5a12e403ecd81640bbeab19f Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 18 Jun 2024 09:46:58 +0200 Subject: [PATCH 3/3] fix: refs #7598 fix evt & .value --- src/components/FormModel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index d7f7f6b97..336ea281e 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -84,7 +84,7 @@ const $props = defineProps({ description: 'It is used for redirect on click "save and continue"', }, }); -const emit = defineEmits(['onFetch', 'onDataSav7ed']); +const emit = defineEmits(['onFetch', 'onDataSaved']); const modelValue = computed( () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}` ).value;