primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Tree: Missing Drag and Drop functionality in newer primereact version

Open pascalbaetz opened this issue 1 year ago • 1 comments

Describe the bug

The Tree Component is missing some old functionality in the newest version. In older versions it was possible to change the order of the Items within the same hierarchy. If you dragged an item between two other items a line showed up and you could just drop the item there to place it between these other items. This functionality is totally missing in the newest version. Another one is quite similar. You are not able to drag and drop items to the top level (hierarchy). If you accidentally moved a top level item somewhere else, it is not possible to undo this action and put the node back to the top level. I tried to visualize it with some screenshots. There is the current version and an older one (9.6.x)

Screenshot 2024-08-16 at 09 28 38 Screenshot 2024-08-16 at 09 28 52

Screenshot 2024-08-16 at 09 30 29 Screenshot 2024-08-16 at 09 30 36

Reproducer

No response

System Information

primereact: 10.8.2 react: 18

Steps to reproduce the behavior

No response

Expected behavior

The same functionality like in the previous primereact versions. E.g. Drag and drop nodes/items to the top/root level of the tree and change the order of nodes within the same hierarchy.

pascalbaetz avatar Aug 16 '24 07:08 pascalbaetz

Definitely a bug.

melloware avatar Aug 16 '24 12:08 melloware

Hi, i had time today and looked into it. I found the issue and fixed it, how can i contribute?

pascalbaetz avatar Sep 13 '24 16:09 pascalbaetz

Yes please submit a PR.

melloware avatar Sep 13 '24 17:09 melloware