Skip to content
Snippets Groups Projects
Commit db7cc611 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13993 TIME 0:10 fix settimeout

parent c4248871
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,12 @@ export class RedirectActionComponent implements OnInit { ...@@ -160,7 +160,12 @@ export class RedirectActionComponent implements OnInit {
}); });
$('#jstree') $('#jstree')
// listen for event // listen for event
.on('select_node.jstree', (e: any, data: any) => { .on('loaded.jstree', (e: any, data: any) => {
if (this.currentEntity.serialId > 0) {
$('#jstree').jstree('select_node', this.currentEntity);
this.selectEntity(this.currentEntity, true);
}
}).on('select_node.jstree', (e: any, data: any) => {
this.selectEntity(data.node.original); this.selectEntity(data.node.original);
}).on('deselect_node.jstree', (e: any, data: any) => { }).on('deselect_node.jstree', (e: any, data: any) => {
...@@ -168,13 +173,6 @@ export class RedirectActionComponent implements OnInit { ...@@ -168,13 +173,6 @@ export class RedirectActionComponent implements OnInit {
}) })
// create the instance // create the instance
.jstree(); .jstree();
if (this.currentEntity.serialId > 0) {
setTimeout(() => {
$('#jstree').jstree('select_node', this.currentEntity);
this.selectEntity(this.currentEntity, true);
}, 200);
}
}, 0); }, 0);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment