Open rmstsd opened 1 year ago
What do you mean by generating a new id on the right side?
Do you need something like this? https://app.simplyfitness.com/workout-builder/new
if left side and right side have same id, when drap left item, right item will move together.
What do you mean by generating a new id on the right side?
Yes, this is the effect I want.
I faced the same problem. You need to regenerate a new id for your sidebar items after each drag event.
I am passing a new state to my sidebar component to make it re-render and using uuid to generate new unique ID for my items.
setSidebarFieldsRegenKey(Date.now());
I faced the same problem. You need to regenerate a new id for your sidebar items after each drag event.
I am passing a new state to my sidebar component to make it re-render and using uuid to generate new unique ID for my items.
setSidebarFieldsRegenKey(Date.now());
Can you give an codesandbox example, please? Thank you!
This is so cool, Thank you very much!
I found that the key code is here, and if this 'div' does not pass 'key' prop, there will be an exception.
I found that the key code is here, and if this 'div' does not pass 'key' prop, there will be an exception.
Did you manage to implement DND the way you wanted?
https://codesandbox.io/p/sandbox/determined-shaw-dggmrv
I want to copy the 'a' on the left side to the right side and generate a new id on the right side, and after copying it, I can't drag the left side the 'a'. It is very queer.