ng2-tree
ng2-tree copied to clipboard
How to make the tree readonly , and prevent user to modify it
I want to prevent the user to add or modify or move the nodes what shall I add 👍
<tree *ngFor="let obj of tree" [tree]="obj" (nodeSelected)="logEvent($event)" >
Please note that I have added the settings but still is not working : <tree *ngFor="let obj of tree" [tree]="obj" (nodeSelected)="logEvent($event)" [settings]="settings">
settings= new TreeModelSettings();
ngOnInit() { this.settings.static = true; this.settings.leftMenu = false;
}
Hello! TreeModelSettings() must be in tree object, like manual says
https://github.com/valor-software/ng2-tree#configure-node-via-treemodelsettings
bind settings in html tag requrire 'settings' was Ng2TreeSettings, check this.
https://github.com/valor-software/ng2-tree#settings