angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

onMoveNode

Open SmartieCodes opened this issue 10 years ago • 2 comments

Version 1.3.2 I can drag and drop my nodes beautifully, it looks great... but the onMoveNode event isn't firing?

<Tree [nodes]="nodes" [options]="treeOptions" (onMoveNode)="onMoveNode($event)"></Tree>
treeOptions = {
    allowDrag: true
}
onMoveNode($event) {
  console.log(
    "Moved",
    $event.node.data.name,
    "to",
    $event.to.node.data.name,
    "at index",
    $event.to.index);
}

I have just done the "fix" mentioned in #68, might be related?

SmartieCodes avatar Oct 07 '16 16:10 SmartieCodes

Nope, this is a bug - forgot to add onMoveNode as Output. Will be fixed in next version.

adamkleingit avatar Oct 15 '16 10:10 adamkleingit

Fixed in 1.3.3

adamkleingit avatar Oct 15 '16 14:10 adamkleingit