New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
FieldArray change triggers validation twice #2170
Comments
I don't know if it's desired behavior but I'm able to figure out what changes were committed which caused this: |
I've noticed that this is happening when a change happens within an element of the array. for example
|
I've digged deeper and now I am seeing a pattern. The amount of validations is equal to the amount of I've made a codesandbox demonstrating this: https://codesandbox.io/s/form-fieldarray-multiple-validation-bug-frxk1 This impacts component's performance because the amount of validations co-relates the amount of re-renders. |
Any updates or workarounds for this? |
馃悰 Bug report
Current Behavior
When Field in FieldArray changed, the validate of Field was triggered twice.
Take a look into example in code sandbox.
Expected behavior
Validation happens only once.
Reproducible example
https://codesandbox.io/s/formik-fieldarray-change-validation-bug-8m6l4
Suggested solution(s)
Additional context
Your environment
The text was updated successfully, but these errors were encountered: