Replace field value over validates other fields?
When using replaceFieldValue, it seems we hardcoded always validating all array elements after the element that was replaced? I don't see any logical reason to do this, it ends up blowing up the amount of errors shown to the user when they didn't touch or do anything to the additional fields?
See:
https://stackblitz.com/edit/vitejs-vite-bftecz1f?file=src%2Fcomponents%2FForm.tsx
Simply hit the replace button on row 1 or 2 and you'll see the error is appended to all rows below it? I don't see any reason why we would hard code this behavior.
juanvilladev
StackBlitz
Replace Field Value issue - StackBlitz
Next generation frontend tooling. It's fast!
0 Replies