Bug: Submitting seems to get stuck as `true`
See original GitHub issueAre 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<void>
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 😃
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Here's How I Solved a Weird Bug Using Tried and True ...
Let's start with the simple and most obvious route and assume that CSS is the cause of the issue. We can consider the...
Read more >How to Write an Effective Bug Report | Lucidchart Blog
Look for an existing bug report before reporting the bug. · Proofread any bug report before you submit it. · Provide as much...
Read more >Grading bug -- fix requested ASAP - Google Support
I get a red alert message in every view (student list on the left and submission file viewer) that the assignment was not...
Read more >Capture and read bug reports - Android Developers
To get crash reports with stack traces from real-world users, take advantage of the Google Play and Firebase crash reporting features. Google ...
Read more >Issue Tracker - Grounded - Obsidian Entertainment
Players are reporting an issue with extremely low mouse sensitivity. Investigating Creatures are spawning in player bases. Investigating Grubs appear to spawn ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A workaround is to put some kind of
await sleep(1)
statement inonSubmit
=\I am also facing a similar issue.
I read following from documentation for react-final-form a)
onSubmit
— Point 3 (returns a promise) https://final-form.org/docs/react-final-form/types/FormProps#onsubmit b)submitting
- https://final-form.org/docs/final-form/types/FormState#submitting I am trying to understand howsubmitting
works in react-final-form.Here’s an example sandbox I created for the same, link: https://codesandbox.io/s/xenodochial-moon-5699r0?file=/index.js
Issue: Clicking on Submit again after first submit, keeps
submitting
as true.