sl-vue-tree icon indicating copy to clipboard operation
sl-vue-tree copied to clipboard

drop from outside source

Open agrothe opened this issue 7 years ago • 2 comments

Question: am I able to apply some classes or data to an element to allow dragging into the tree from an outside source?

I can add elements via selecting a node then then splice/push on the data array, but not having any luck reading the drop event as it's probably set to cancel default and stop propagation?

Maybe expose a drop event with the index of the node dropped onto?

agrothe avatar Jul 08 '18 18:07 agrothe

That looks like a good proposal. I'm going to create a PR for that.

holiber avatar Jul 11 '18 05:07 holiber

I exposed externaldrop event. I need to test it more before release a new version but you can try out demo/externalaldrag.html example from the master branch.

holiber avatar Jul 17 '18 05:07 holiber