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
Hi guys, first of all, really love this library and using it everywhere.
Could you help me understand this behavior and how can I overcome it. Not sure if it would be classified as a bug (probably not), rather its quite unintuative so I am trying to understand what is happening there.
I have created a reproduction of the issue: codesandbox
Steps to reproduce:
Drag the top list to the bottom (with the X)
Click on the add button on the top list (was previously on the bottom)
What you will see is that after moving the element using the useFieldArray hook, the form somehow merges the values between the dragged items. This is only happening when using the DragOverlay component which performs a drop animation -> My guess is that during the drop animation, the fields are still active and register on the wrong index or something? Does react-hook-form trigger a change there?
I will appriciate any help, need this for my job where we have quite complex multiple times nested draggable structures within a form with inputs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys, first of all, really love this library and using it everywhere.
Could you help me understand this behavior and how can I overcome it. Not sure if it would be classified as a bug (probably not), rather its quite unintuative so I am trying to understand what is happening there.
I have created a reproduction of the issue: codesandbox
Steps to reproduce:
What you will see is that after moving the element using the useFieldArray hook, the form somehow merges the values between the dragged items. This is only happening when using the DragOverlay component which performs a drop animation -> My guess is that during the drop animation, the fields are still active and register on the wrong index or something? Does
react-hook-form
trigger a change there?I will appriciate any help, need this for my job where we have quite complex multiple times nested draggable structures within a form with inputs.
Beta Was this translation helpful? Give feedback.
All reactions