From 32dac089f866793cea3c3948b582ca6301619400 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 6 Mar 2025 10:11:56 +0100 Subject: [PATCH] feat: refs #8725 saveAndContinue --- src/components/FormModel.vue | 7 +++---- src/components/FormModelPopup.vue | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 184913c49..57456ba3d 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -144,8 +144,8 @@ const defaultButtons = computed(() => ({ })); const submitForm = async () => { - const valid = await myForm.value.validate(); - if (valid) { + const isFormValid = await myForm.value.validate(); + if (isFormValid) { try { await save(); } catch (error) { @@ -333,7 +333,6 @@ async function onKeyup(evt) { } defineExpose({ - myForm, save, isLoading, hasChanges, @@ -347,7 +346,7 @@ defineExpose({ { const onClick = async (saveAndContinue) => { isSaveAndContinue.value = saveAndContinue; - formModelRef.value.myForm.submit(); }; defineExpose({ @@ -88,6 +87,7 @@ defineExpose({ :flat="showSaveAndContinueBtn" :label="t('globals.save')" :title="t('globals.save')" + @click="onClick(false)" type="submit" color="primary" class="q-ml-sm" @@ -101,6 +101,7 @@ defineExpose({ :label="t('globals.isSaveAndContinue')" :title="t('globals.isSaveAndContinue')" color="primary" + type="submit" class="q-ml-sm" :disabled="isLoading" :loading="isLoading"