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
FieldArray.pop doesn't remove touched on the removed field
Current Behavior
When I remove an element from an array with FieldArray.remove, the element is unmarked as touched. If I remove the element with FieldArray.pop, it's still marked as touched.
Expected behavior
I expect FieldArray.pop to have the same side effects as FieldArray.remove
Hey guys, just came here goggling to fix a similar bug in our lib. Just wanted to tell you this issue is real, and related to TouchEvents spec. Here's some info:
🐛 Bug report
FieldArray.pop
doesn't remove touched on the removed fieldCurrent Behavior
When I remove an element from an array with
FieldArray.remove
, the element is unmarked as touched. If I remove the element withFieldArray.pop
, it's still marked as touched.Expected behavior
I expect
FieldArray.pop
to have the same side effects asFieldArray.remove
Reproducible example
https://codesandbox.io/embed/rwl80mzvwo
Suggested solution(s)
Remove touched on the element removed by pop
Additional context
Your environment
The text was updated successfully, but these errors were encountered: