Skip to content

Commit

Permalink
Don't reveal the focused element when updating the tree rows
Browse files Browse the repository at this point in the history
Fixes eclipse-theia#13461

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
  • Loading branch information
tsmaeder committed May 9, 2024
1 parent f0fa2c2 commit 12391c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/browser/tree/tree-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class TreeWidget extends ReactWidget implements StatefulWidget {
}
}
this.rows = new Map(rowsToUpdate);
this.updateScrollToRow();
this.update();
}

protected getDepthForNode(node: TreeNode, depths: Map<CompositeTreeNode | undefined, number>): number {
Expand Down Expand Up @@ -1575,9 +1575,9 @@ export namespace TreeWidget {
}}
totalCount={rows.length}
itemContent={index => this.props.renderNodeRow(rows[index])}
width={width}
width={width}
height={height}
// This is a pixel value, it will scan 200px to the top and bottom of the current view
// This is a pixel value, it will scan 200px to the top and bottom of the current view
overscan={500}
/>;
}
Expand Down

0 comments on commit 12391c0

Please sign in to comment.