-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get the parent node when dragging:finish #75
Comments
Looking for the same functionality. @amsik have you had a chance to look? |
Hey there, I am also looking for this functionality. In the docs there is this example (slightly edited):
However, destinationNode is undefined. |
Hi. I've changed a callbacks names. dnd: {
onDragStart(node) {
return node.data.isNotDraggable !== true
},
onDragOn(targetNode, destinationNode) {
console.log('onDragOn', targetNode.text, destinationNode.text)
return destinationNode.data.isNotDroppable !== true
},
onDragFinish(targetNode, destinationNode) {
console.log('onDragFinish', targetNode.text, destinationNode.text)
return destinationNode.data.isNotDroppable !== true
}
}
|
Hello! After dragging Maybe Jurgen P.S: Here's the code I am testing this with:
|
I was also thinking about The P.S: pardon me for calling them folders, as I am dealing with a tree of folders 😄 |
I'm trying to get the "new parent" of a node after drop it in that new parent node. I'm using the event node:dragging:finish, like this:
And in the handler
However, the console shows a
null
value. Is this an expected behavior or a bug?It fact, if I want to get the new parent of the node I have been forced to do something like this:
And then with these little ugly code I can get the parent.
The text was updated successfully, but these errors were encountered: