diff --git a/src/tree-internal.component.ts b/src/tree-internal.component.ts index 1da00de3..d882918f 100644 --- a/src/tree-internal.component.ts +++ b/src/tree-internal.component.ts @@ -175,13 +175,13 @@ export class TreeInternalComponent implements OnInit, OnChanges, OnDestroy, Afte } private moveNodeToThisTreeAndRemoveFromPreviousOne(e: NodeDraggableEvent, tree: Tree): void { - this.treeService.fireNodeRemoved(e.captured.tree); + e.captured.tree.removeItselfFromParent(); const addedChild = tree.addChild(e.captured.tree); this.treeService.fireNodeMoved(addedChild, e.captured.tree.parent); } private moveNodeToParentTreeAndRemoveFromPreviousOne(e: NodeDraggableEvent, tree: Tree): void { - this.treeService.fireNodeRemoved(e.captured.tree); + e.captured.tree.removeItselfFromParent(); const addedSibling = tree.addSibling(e.captured.tree, tree.positionInParent); this.treeService.fireNodeMoved(addedSibling, e.captured.tree.parent); }