Merge pull request #12888 from ArtemDzhereleiko/AD/bug-fix/customer-hierarchy

Fixed changed event on customer hierarchy
This commit is contained in:
Igor Kulikov 2025-03-13 19:13:27 +02:00 committed by GitHub
commit f748ae1580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -149,9 +149,9 @@ export class NavTreeComponent implements OnInit {
this.treeElement = $('.tb-nav-tree-container', this.elementRef.nativeElement).jstree(config); this.treeElement = $('.tb-nav-tree-container', this.elementRef.nativeElement).jstree(config);
this.treeElement.on('select_node.jstree', (e: any, data) => { this.treeElement.on('changed.jstree', (e: any, data) => {
const node: NavTreeNode = data.instance.get_selected(true)[0]; if (this.onNodeSelected && data.action !== 'ready') {
if (this.onNodeSelected) { const node: NavTreeNode = data.instance.get_selected(true)[0];
this.ngZone.run(() => this.onNodeSelected(node, e as Event)); this.ngZone.run(() => this.onNodeSelected(node, e as Event));
} }
}); });

View File

@ -27,6 +27,7 @@ interface JQuery {
interface JSTreeEventData { interface JSTreeEventData {
instance: JSTree; instance: JSTree;
action: string;
} }
interface JSTreeModelEventData extends JSTreeEventData { interface JSTreeModelEventData extends JSTreeEventData {