Browse Source

Fix nav tree component - run callbacks in angular zone

pull/3559/head
Igor Kulikov 6 years ago
parent
commit
dfbc3c3e2d
  1. 4
      ui-ngx/src/app/shared/components/nav-tree.component.ts

4
ui-ngx/src/app/shared/components/nav-tree.component.ts

@ -150,13 +150,13 @@ export class NavTreeComponent implements OnInit {
this.treeElement.on('changed.jstree', (e: any, data) => { this.treeElement.on('changed.jstree', (e: any, data) => {
const node: NavTreeNode = data.instance.get_selected(true)[0]; const node: NavTreeNode = data.instance.get_selected(true)[0];
if (this.onNodeSelected) { if (this.onNodeSelected) {
this.onNodeSelected(node, e as Event); this.ngZone.run(() => this.onNodeSelected(node, e as Event));
} }
}); });
this.treeElement.on('model.jstree', (e: any, data) => { this.treeElement.on('model.jstree', (e: any, data) => {
if (this.onNodesInserted) { if (this.onNodesInserted) {
this.onNodesInserted(data.nodes, data.parent); this.ngZone.run(() => this.onNodesInserted(data.nodes, data.parent));
} }
}); });

Loading…
Cancel
Save