fix: remove resetForm from onSuccess to prevent validation flash in dialogs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,7 +110,6 @@ function onSubmit() {
|
|||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
showSuccess.value = true
|
showSuccess.value = true
|
||||||
resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ function onSubmit() {
|
|||||||
successEmail.value = email.value
|
successEmail.value = email.value
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
showSuccess.value = true
|
showSuccess.value = true
|
||||||
resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ function onSubmit() {
|
|||||||
const onSuccess = () => {
|
const onSuccess = () => {
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
emit('saved')
|
emit('saved')
|
||||||
resetForm()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onError = (err: any) => {
|
const onError = (err: any) => {
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ function onSubmit() {
|
|||||||
successName.value = form.value.name
|
successName.value = form.value.name
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
showSuccess.value = true
|
showSuccess.value = true
|
||||||
resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ function onSubmit() {
|
|||||||
redirectedToParent: result.redirectedToParent,
|
redirectedToParent: result.redirectedToParent,
|
||||||
parentEventName: result.parentEventName,
|
parentEventName: result.parentEventName,
|
||||||
})
|
})
|
||||||
resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ function onSubmit() {
|
|||||||
const callbacks = {
|
const callbacks = {
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
if (!isEditing.value) resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ function onSubmit() {
|
|||||||
const callbacks = {
|
const callbacks = {
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
if (!isEditing.value) resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ function onSubmit() {
|
|||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
modelValue.value = false
|
modelValue.value = false
|
||||||
emit('updated')
|
emit('updated')
|
||||||
resetForm()
|
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
const data = err.response?.data
|
const data = err.response?.data
|
||||||
|
|||||||
Reference in New Issue
Block a user