0

I am using react beautiful dnd. I have two lists I have to drag from list A to list B but don't want to remove(whatever the animated effect it is) from list A when I hold & drag the item. I want it to be visible on the list A as it is. How can I do that?

For example https://codesandbox.io/s/-w5szl Left side is suppose to be list A & right is list B

Here when I am dragging 0th item from A to B I want it to be visible into A as well.

How Can I do that... Please help

Profer
  • 553
  • 8
  • 40
  • 81

1 Answers1

0

In onClick event function you create a new DOM element that is exactly like that list card and add that inside the list at the same place.
But if you will do this in this way then if you are dragging the item inside the same list, duplicate will be created (meaning that if you are just changing the position of item within the same like). if you don't want this that I would say you should consider some other design method for placing the item in different list.

If you still want this same animation effect then you can add a conditional statement [if item added inside same list then remove the created item]. But this will not look that good.
I was not able to check the second link, it was relocating to Something went wrong page

TanmayKr
  • 33
  • 6