final-form / final-form/react-final-form
Bug: Submitting seems to get stuck as `true`
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
Bug report
### What is the current behavior?
Example repo: https://codesandbox.io/s/dreamy-goodall-cvy9c?file=/index.js
Seems that, if `handleSubmit` returns `Promis` without causing an async tick, submission gets stuck in `submitting: true` state.
### What is the expected behavior?
Shouldn't be stuck in submitting; should briefly be `submitting: true` then switch back to false
### Sandbox Link
https://codesandbox.io/s/dreamy-goodall-cvy9c?file=/index.js
### What's your environment?
Latest final-form/rff
### Other information
Hey Erik! 👋 I'll try to dig in at root cause. I have some free time :)
Contributor guide
Research direction
Reproduce the behavior in the linked CodeSandbox, starting at the handleSubmit implementation and observing the submitting state when it returns Promise without an async tick. Trace the submission lifecycle in the project and verify that submitting briefly becomes true and then returns to false for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100