he-tree
he-tree copied to clipboard
Add class on current dragging item
Hi
It's possible to add class on current dragging item (the ghost item)?
fro change this:
Tks.
no, it is a image. use HTML Drag and Drop API's setDragImage method to custom drag image in ondragstart, check: https://hetree.phphe.com/v2/api#ondragstart
Hello, understood, one more question: Can I get the content of current element, for populate the div.innerText with name that element contains
In this case of image: React ... div.innerText = 'React'
Tks.
ondragstart: (event) => event.target
I already try this, but event.target return the tree, and not de current element only.
console.log(event.target)
try add different class to each node, and get drag element by the class