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
See that as intended a "had duplicates" error is shown
Select "1" in the dropdown
Clear the input
See that as intended the required error is shown
Click on "Add array element"
See the bug: The errors from element 1 shifted to element 0
If the "validate" rule of the array is removed, the shift of the errors does not occur.
Video:
Aufzeichnung.2024-04-18.114130.mp4
There is actually another bug in the sample I provided. As you can see on row 29-30 in Form.tsx, I added two state-updates as a workaround. The problem is, if the element changes right away, the next selected array element gets the values of the previous selected one.
Steps:
Comment out row 29 in Form.tsx
Click two times on "Add array element"
Select "1" in the dropdown
Change the value
Select "0" in the dropdown
See that the input field does not change
Video:
out.mp4
Expected behaviour
The errors don't shift
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Version Number
7.51.3
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/react-18-typescript-forked-7kqrl4?file=%2Fsrc%2Findex.tsx
Steps to reproduce
If the "validate" rule of the array is removed, the shift of the errors does not occur.
Video:
Aufzeichnung.2024-04-18.114130.mp4
There is actually another bug in the sample I provided. As you can see on row 29-30 in
Form.tsx
, I added two state-updates as a workaround. The problem is, if the element changes right away, the next selected array element gets the values of the previous selected one.Steps:
Video:
out.mp4
Expected behaviour
The errors don't shift
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: