Browse Source
Merge pull request #12888 from ArtemDzhereleiko/AD/bug-fix/customer-hierarchy
Fixed changed event on customer hierarchy
pull/12927/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
3 deletions
-
ui-ngx/src/app/shared/components/nav-tree.component.ts
-
ui-ngx/src/typings/jquery.jstree.typings.d.ts
|
|
|
@ -149,9 +149,9 @@ export class NavTreeComponent implements OnInit { |
|
|
|
|
|
|
|
this.treeElement = $('.tb-nav-tree-container', this.elementRef.nativeElement).jstree(config); |
|
|
|
|
|
|
|
this.treeElement.on('select_node.jstree', (e: any, data) => { |
|
|
|
const node: NavTreeNode = data.instance.get_selected(true)[0]; |
|
|
|
if (this.onNodeSelected) { |
|
|
|
this.treeElement.on('changed.jstree', (e: any, data) => { |
|
|
|
if (this.onNodeSelected && data.action !== 'ready') { |
|
|
|
const node: NavTreeNode = data.instance.get_selected(true)[0]; |
|
|
|
this.ngZone.run(() => this.onNodeSelected(node, e as Event)); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -27,6 +27,7 @@ interface JQuery { |
|
|
|
|
|
|
|
interface JSTreeEventData { |
|
|
|
instance: JSTree; |
|
|
|
action: string; |
|
|
|
} |
|
|
|
|
|
|
|
interface JSTreeModelEventData extends JSTreeEventData { |
|
|
|
|