mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 09:50:33 +01:00
fix(Form): clear dirty state after submit (#3692)
This commit is contained in:
@@ -217,6 +217,7 @@ async function onSubmitWrapper(payload: Event) {
|
|||||||
try {
|
try {
|
||||||
event.data = await _validate({ nested: true, transform: props.transform })
|
event.data = await _validate({ nested: true, transform: props.transform })
|
||||||
await props.onSubmit?.(event)
|
await props.onSubmit?.(event)
|
||||||
|
dirtyFields.clear()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!(error instanceof FormValidationException)) {
|
if (!(error instanceof FormValidationException)) {
|
||||||
throw error
|
throw error
|
||||||
|
|||||||
Reference in New Issue
Block a user