Skip to content

fix: incorrect formState after doc save - #9573

Merged
JarrodMFlesch merged 4 commits into
mainfrom
fix/doc-onSave-form-state
Nov 27, 2024
Merged

JarrodMFlesch merged 4 commits into
mainfrom
fix/doc-onSave-form-state

Conversation

@JarrodMFlesch

Copy link
Copy Markdown
Contributor

What?

When the document is saved the formState was not being reset from the server.

Why?

getFormState was not being called onSuccess of the form submission

How?

The Form onSuccess function now allows for an optional return type of FormState if the functions returns formState then we check to see if that differs from the current formState on the client. If it does then we dispatch the REPLACE_STATE action with the newState.

Fixes #9423

@JarrodMFlesch
JarrodMFlesch merged commit 4b302f2 into main Nov 27, 2024
@JarrodMFlesch
JarrodMFlesch deleted the fix/doc-onSave-form-state branch November 27, 2024 21:45
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.2.2

kendelljoseph pushed a commit that referenced this pull request Feb 21, 2025
### What?
When the document is saved the formState was not being reset from the
server.

### Why?
getFormState was not being called onSuccess of the form submission

### How?
The `Form` onSuccess function now allows for an optional return type of
`FormState` if the functions returns formState then we check to see if
that differs from the current formState on the client. If it does then
we dispatch the `REPLACE_STATE` action with the newState.

Fixes #9423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

beforeValidate hook runs, but doesn't update UI during update operation

1 participant