Right click tree to show node context menu
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

master
Garrett Mills 3 years ago
parent 3474fe4cc4
commit d99503250a
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -80,7 +80,31 @@ export class AppComponent implements OnInit {
this.menuTarget = node;
this.lastClickEvent = [tree, node, $event];
}
},
contextMenu: (tree, node, event) => {
event.preventDefault();
event.stopPropagation();
TREE_ACTIONS.FOCUS(tree, node, event);
TREE_ACTIONS.EXPAND(tree, node, event);
this.addChildTarget = false;
this.deleteTarget = false;
this.menuTarget = false;
if ( !node.data.noChildren && (!node.data.level || node.data.level === 'manage') ) {
this.addChildTarget = node;
}
if ( !node.data.noDelete && (!node.data.level || node.data.level === 'manage') ) {
this.deleteTarget = node;
}
this.menuTarget = node;
this.lastClickEvent = [tree, node, event];
this.onNodeMenuClick(event);
},
}
}
};

Loading…
Cancel
Save