How to avoid reseting the form after succesfull submission #606
-
Hey everyone, I'm working on an app that supports optimistic UI. I want users to submit a form and keep adding new records without the form resetting after each submission. My backend takes about 3 seconds to process. So, after a user adds a record, I show them an optimistic version and they continue adding more. However, after the 3 seconds it takes for the submission to succeed, the form resets. How can I prevent this reset? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
edmundhung
May 1, 2024
Replies: 1 comment 2 replies
-
@edmundhung sorry to tag you, any solutions here, thanks 🙏 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Conform does not reset the form by default. It will reset the form only if you call
form.reset()
in the form orsubmission.reply({ resetForm: true })
in the action. If you are still unsure about your case, please share a codesandbox or stackblitz that reproduce your issue.