Skip to content

Commit

Permalink
use settimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Nov 9, 2023
1 parent 4cc4696 commit 349032e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@edsilv/utils": "^1.0.2",
"@google/model-viewer": "^1.9.2",
"@iiif/base-component": "2.0.1",
"@iiif/iiif-av-component": "1.2.3",
"@iiif/iiif-av-component": "1.2.4",
"@iiif/iiif-gallery-component": "^1.1.21",
"@iiif/iiif-metadata-component": "^1.1.19",
"@iiif/iiif-tree-component": "2.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class TreeView extends BaseView {
"treeNodeSelected",
function(node: TreeNode) {
that.extensionHost.publish(IIIFEvents.TREE_NODE_SELECTED, node);
this.resize(); // renders the tree component and highlights the selected element
},
false
);
Expand Down Expand Up @@ -75,7 +74,9 @@ export class TreeView extends BaseView {
}
}

this.treeComponent.selectNode(node);
setTimeout(() => {
this.treeComponent.selectNode(node);
}, 0);
}

public expandNode(node: TreeNode, expanded: boolean): void {
Expand Down

1 comment on commit 349032e

@vercel
Copy link

@vercel vercel bot commented on 349032e Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.