-
-
Notifications
You must be signed in to change notification settings - Fork 494
Closed
Description
Are you submitting a bug report or a feature request?
Bug report.
What is the current behavior?
If setting subscription, under certain circumstances which seem to be related to the time the submit callback takes to complete, form.submitting is not reset. It will stay true even after the onSubmit async callback resolves.
What is the expected behavior?
form.submitting should always flip back to false when the promise-returning or async onSubmit callback resolves.
Sandbox Link
- Take any of the examples on the website, like this one.
- Comment the
await sleep(300);call on L:10. - Try submitting any values with both forms shown.
- Notice the difference between the top and bottom forms: "Submit" button on second form will remain
disableddue tosubmitting. - Re-adding the
await sleep(300)call makes the behaviour go back to normal.
What's your environment?
react-final-form:6.5.2final-form:4.20.1react:17.0.1nodejs:v14.15.0
Running on macOS Catalina 10.15.7 (19H2).
tomas-c and correaricardo
Metadata
Metadata
Assignees
Labels
No labels