Browse Source
Merge pull request #12298 from maxunbearable/fix/4852-tree-select-event
Hierarcy widget fires select node action too many times fix
pull/12314/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
ui-ngx/src/app/shared/components/nav-tree.component.ts
|
|
|
@ -149,7 +149,7 @@ export class NavTreeComponent implements OnInit { |
|
|
|
|
|
|
|
this.treeElement = $('.tb-nav-tree-container', this.elementRef.nativeElement).jstree(config); |
|
|
|
|
|
|
|
this.treeElement.on('changed.jstree', (e: any, data) => { |
|
|
|
this.treeElement.on('select_node.jstree', (e: any, data) => { |
|
|
|
const node: NavTreeNode = data.instance.get_selected(true)[0]; |
|
|
|
if (this.onNodeSelected) { |
|
|
|
this.ngZone.run(() => this.onNodeSelected(node, e as Event)); |
|
|
|
|