Skip to content

Commit

Permalink
Disposing a tree view while it's visible causes it to stay empty (#21…
Browse files Browse the repository at this point in the history
…2085)

Part of #212078
  • Loading branch information
alexr00 authored May 6, 2024
1 parent 0699aca commit dc96b83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vs/workbench/browser/parts/views/treeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {

set dataProvider(dataProvider: ITreeViewDataProvider | undefined) {
if (dataProvider) {
if (this.visible) {
this.activate();
}
const self = this;
this._dataProvider = new class implements ITreeViewDataProvider {
private _isEmpty: boolean = true;
Expand Down

2 comments on commit dc96b83

@Khaiduyet
Copy link

Choose a reason for hiding this comment

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

src/vs/workbench/browser/parts/views/treeView.ts

@Khaiduyet
Copy link

Choose a reason for hiding this comment

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

Tuyệt lắm

Please sign in to comment.