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
User has three fields. "fillFields", "firstName", "lastName". fill - is a radio button. When user clicks on this fields both another fields are filling some values.
Filling of this values happen in useEffect hook. And all works fine without validation. It doesn't work properly.
The error one of field is cleared, but the error second field still display to user
Then if i click outside fillFields. Validation runs again after onBlur and the error disappears. But it has to disappear after onChange. The validation needs to call after updating of values state.
Bug report
Current Behavior
User has three fields. "fillFields", "firstName", "lastName".
fill
- is a radio button. When user clicks on this fields both another fields are filling some values.Filling of this values happen in
useEffect hook
. And all works fine without validation. It doesn't work properly.I have the example. https://codesandbox.io/s/red-glade-x3y32
Step to reproduce this bug:
Then if i click outside
fillFields
. Validation runs again after onBlur and the error disappears. But it has to disappear afteronChange
. The validation needs to call after updating of values state.Expected behavior
The errors doesn't appear to user for all fields.
Reproducible example
https://codesandbox.io/s/red-glade-x3y32?file=/src/App.js
Additional context
I use
useFormik
hook. I suppose validation doesn't has to run before the state was updated.Your environment
The text was updated successfully, but these errors were encountered: