-
|
Does anyone have an idea how to correctly use The |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
You can use directly Working demo: https://codesandbox.io/s/rhf-dndkit-bs-forked-65dlr6?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
-
|
I was working on this TanStack Table library and thought the problem was there, but thanks to this issue I realized the problem was actually the reset from useFieldArray. I replaced reset with move, and it worked. |
Beta Was this translation helpful? Give feedback.
@elieven
You can use directly
movemethod fromuseFieldArrayhook to change position index of field array item after drag end.Working demo: https://codesandbox.io/s/rhf-dndkit-bs-forked-65dlr6?file=/src/App.tsx