smooth-dnd
smooth-dnd copied to clipboard
Select element for the draggable wrapper
We can select the container element during initialization. Is there any way that I can select which element is going to be the draggable wrapper.
The reason for asking this is because I'm trying to make the plugin work with table rows. I can select the tbody as the container but after initialization the plugin inserts an additional div for the draggable element, after the tbody and before the tr element and the tables breaks, as expected.
Thanks for this great plugin.
Could you fix this? I've solved this by using the Draggable's render method.
@juanrisso can you please explain a little bit how did you solve the issue? In my case I too want to modify the wrapper. At this time I am overriding the parent element(i.e. wrapper element provided by the library) of draggable by my own wrapper in the onDrop function but when I drag and drop really fast, it breaks the code.
@SarthakSri98 Some time ago we switched the library to react-list-drag-and-drop because of that problem. Sorry, I cant help you
Same here, I ended up using another library for the reason that I'm describing in my initial post.
@skoulix okay, can you please tell me what library you used?
@skoulix okay, can you please tell me what library you used?
So many libraries out there... When I posted this comment 2 years ago I was working on a specific project. For that project I used this one https://sortablejs.github.io/Vue.Draggable since it was a Vue.js project. Also another feature rich library I stumbled upon is this one https://shopify.github.io/draggable/
I hope this helps.