I want to prevent opening wijmo tree node based on some condition or disabling specific node based on condition. I tried to use 'expandOnClick' property of treeview which prevents the opening of current node but it is possible to open node on clicking glyph icon. I am using wijmo 5.2019 with angular 8.
<wj-tree-view #treeView [itemsSource]="itemsSource" [displayMemberPath]="'Name'" [wjContextMenu]="ctxMenu" [childItemsPath]="'Children'"
(formatItem)="formatItem(treeView, $event)" [allowDragging]="config.canDrag ? true : false" [expandOnClick]="this.openNode">
How can i prevent opening node?
You can handle the isCollapsedChanging event of the TreeView and cancel the event if the condition match. I have created a demo sample for you here.