Skip to content

Commit d6414d5

Browse files
author
Georgii Rychko
authored
fix(tree-controller): handle change dection in expandToParent properly (#248)
1 parent cbef0f9 commit d6414d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tree-controller.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ export class TreeController {
4141
if (tree) {
4242
const controller = this.treeService.getController(tree.id);
4343
if (controller) {
44-
controller.expand();
45-
this.expandToParent(tree.parent);
44+
requestAnimationFrame(() => {
45+
controller.expand();
46+
this.expandToParent(tree.parent);
47+
});
4648
}
4749
}
4850
}

0 commit comments

Comments
 (0)