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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with clear array errors in FieldArray #1097
Comments
Another case which relates to this issue |
please help testing on |
@bluebill1049 I found only 4.9.9-beta.1 on codesandbox. I could test on my own project |
hey @DisaPadla you can install this beta on the CSB (ignore the drop down, just click install) :) make sure point to 'react-hook-form' instead of './src' folder. |
@bluebill1049 look at this example
Result |
aha awesome thanks! |
I didn't find anything else. |
Awesome thanks a lot, I will patch that issue tonight. ❤️ |
patched: https://codesandbox.io/s/formstate-is-not-still-valid-after-removing-items-ewufu making PR for the fix now :) |
|
https://codesandbox.io/s/formstate-is-not-still-valid-after-removing-items-ewufu try again, maybe i forgot to save. |
Oh, look at this case:
But if you replace 5 and 6 steps, like |
interesting... you are right |
sorted :) https://codesandbox.io/s/formstate-is-not-still-valid-after-removing-items-ewufu thanks a lot for your testing effort. |
looks good for me! |
awesome! thanks for the verification. |
* close #1097 issue with formState * fix type * fix delete index issue * revert logic * working version with formstate * optimized version * clean up code logic * keep array length inline * upgrade packages * fix logic with index 0 and update with automation * update with automation * update automation script
When "errors" is empty the array is not been removed in "errors" object
Steps to reproduce the behavior:
console.log(errors);
. We still have an array in "errors" objectExpected behavior
submit button should be active
Codesandbox link
https://codesandbox.io/embed/react-hook-validate-trigger-sb1lj?fontsize=14&hidenavigation=1&theme=dark
discussion on spectrum
https://spectrum.chat/react-hook-form/help/strange-validation-behavior-for-fields-array~b6982a9b-25f3-4fc7-adf5-cd3e1f5a27f7
The text was updated successfully, but these errors were encountered: