Describe the bug
I am using sortable.js in my react app, and i have the use-case where I wanted to either drag and drop item from sourceList or if I click on the sourceList item, that item get appended to the targetList.
The click event is triggering fine until I drag the item from sourceList, once I drag the item the click event on the dragged item is getting removed.
Describe the bug I am using sortable.js in my react app, and i have the use-case where I wanted to either drag and drop item from sourceList or if I click on the sourceList item, that item get appended to the targetList.
The click event is triggering fine until I drag the item from sourceList, once I drag the item the click event on the dragged item is getting removed.
I have a sourceList as follow
And TagretList as follow
And in my App.jsx
Attaching video for reference,
https://github.com/user-attachments/assets/9780bd34-ed56-40d3-8475-2995d012c671
To Reproduce Steps to reproduce the behavior:
Expected behavior
Cloned element on the target list should have the click event, instead the source list element should maintain the click events associated to it.
Information
Versions - Look in your
package.json
for this information: sortablejs = ^1.15.2 @types/sortablejs = ^1.15.8