Skip to content

Lock handleSubmit while submitting#433

Closed
Andarist wants to merge 1 commit into
final-form:masterfrom
Andarist:lock-submitting
Closed

Lock handleSubmit while submitting#433
Andarist wants to merge 1 commit into
final-form:masterfrom
Andarist:lock-submitting

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

@Andarist Andarist commented Mar 4, 2019

Actually this probably could be included in final-form itself. If you'd like to include this change, let me know in which package and I'll update my PR (or move it) appropriately. I might also write tests once you approve the logic

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2019

Codecov Report

Merging #433 into master will decrease coverage by 0.45%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
- Coverage     100%   99.54%   -0.46%     
==========================================
  Files          10       10              
  Lines         210      219       +9     
  Branches       62       64       +2     
==========================================
+ Hits          210      218       +8     
- Misses          0        1       +1
Impacted Files Coverage Δ
src/ReactFinalForm.js 98.46% <90%> (-1.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 286a69b...9b1fd7d. Read the comment docs.

@erikras
Copy link
Copy Markdown
Member

erikras commented Mar 4, 2019

So this is just submit() { if(submitting) { return } ..... } logic?

@erikras
Copy link
Copy Markdown
Member

erikras commented Mar 4, 2019

...and yes, FF is the place for this.

@Andarist
Copy link
Copy Markdown
Contributor Author

Andarist commented Mar 4, 2019

So this is just submit() { if(submitting) { return } ..... } logic?

Yeah, total brain fart, lol. I've kinda copy pasted what I've put into my app to handle this (as I dont get easy access to the FF state from outside of the ). Totally missed the obvious fact that I can actually use the FF state here 😅

@lock
Copy link
Copy Markdown

lock Bot commented Apr 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Apr 3, 2019
@erikras
Copy link
Copy Markdown
Member

erikras commented May 16, 2019

Published fix in final-form@4.13.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants