diff --git a/src/tree-controller.ts b/src/tree-controller.ts index d8ec0fd3..6186a848 100644 --- a/src/tree-controller.ts +++ b/src/tree-controller.ts @@ -41,8 +41,10 @@ export class TreeController { if (tree) { const controller = this.treeService.getController(tree.id); if (controller) { - controller.expand(); - this.expandToParent(tree.parent); + requestAnimationFrame(() => { + controller.expand(); + this.expandToParent(tree.parent); + }); } } }