Merge pull request #12298 from maxunbearable/fix/4852-tree-select-event

Hierarcy widget fires select node action too many times fix
This commit is contained in:
Igor Kulikov 2024-12-19 18:11:10 +02:00 committed by GitHub
commit 81824c9c29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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));