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: () => {
|
||||
modelValue.value = false
|
||||
showSuccess.value = true
|
||||
resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -49,7 +49,6 @@ function onSubmit() {
|
||||
successEmail.value = email.value
|
||||
modelValue.value = false
|
||||
showSuccess.value = true
|
||||
resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -84,7 +84,6 @@ function onSubmit() {
|
||||
const onSuccess = () => {
|
||||
modelValue.value = false
|
||||
emit('saved')
|
||||
resetForm()
|
||||
}
|
||||
|
||||
const onError = (err: any) => {
|
||||
|
||||
@@ -99,7 +99,6 @@ function onSubmit() {
|
||||
successName.value = form.value.name
|
||||
modelValue.value = false
|
||||
showSuccess.value = true
|
||||
resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -85,7 +85,6 @@ function onSubmit() {
|
||||
redirectedToParent: result.redirectedToParent,
|
||||
parentEventName: result.parentEventName,
|
||||
})
|
||||
resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -154,7 +154,6 @@ function onSubmit() {
|
||||
const callbacks = {
|
||||
onSuccess: () => {
|
||||
modelValue.value = false
|
||||
if (!isEditing.value) resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -123,7 +123,6 @@ function onSubmit() {
|
||||
const callbacks = {
|
||||
onSuccess: () => {
|
||||
modelValue.value = false
|
||||
if (!isEditing.value) resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
@@ -84,7 +84,6 @@ function onSubmit() {
|
||||
onSuccess: () => {
|
||||
modelValue.value = false
|
||||
emit('updated')
|
||||
resetForm()
|
||||
},
|
||||
onError: (err: any) => {
|
||||
const data = err.response?.data
|
||||
|
||||
Reference in New Issue
Block a user