You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using react-custom-validation@0.5.7 and react@16.3.1.
This happens when submit occurs while the validation result is still undetermined.
The following events happen in the library:
dispatchUpdate is called from setTimeout
form is valid so onValid gets called and changes the redux state
change in redux state causes render of the parent of validate form
this causes call of componentWillReceiveProps in validated HOC
dispatchUpdate is called again but the register is still in submitting state (call of onValid has not finished yet)
I was able to reproduce this issue only when running cypress tests as the async validation is quite fast.
The text was updated successfully, but these errors were encountered:
misogl
changed the title
onValid function passed to $submit can be called twice when using async validations
onValid function passed to $submit can be called twice when using async validations
Jun 13, 2018
I'm using
react-custom-validation@0.5.7
andreact@16.3.1
.This happens when submit occurs while the validation result is still undetermined.
The following events happen in the library:
dispatchUpdate
is called fromsetTimeout
onValid
gets called and changes the redux staterender
of the parent of validate formcomponentWillReceiveProps
in validated HOCdispatchUpdate
is called again but the register is still in submitting state (call ofonValid
has not finished yet)I was able to reproduce this issue only when running cypress tests as the async validation is quite fast.
The text was updated successfully, but these errors were encountered: