Skip to content

Commit

Permalink
Use collapseByDefault in custom view tree
Browse files Browse the repository at this point in the history
Part of #63566
  • Loading branch information
alexr00 committed Jul 9, 2019
1 parent 7fdb996 commit 680ce7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/workbench/browser/parts/views/customView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ export class CustomTreeView extends Disposable implements ITreeView {
return item.label ? item.label.label : (item.resourceUri ? basename(URI.revive(item.resourceUri)) : undefined);
}
},
expandOnlyOnTwistieClick: (e: ITreeItem) => !!e.command
expandOnlyOnTwistieClick: (e: ITreeItem) => !!e.command,
collapseByDefault: (e: ITreeItem): boolean => {
return e.collapsibleState !== TreeItemCollapsibleState.Expanded;
}
}) as WorkbenchAsyncDataTree<ITreeItem, ITreeItem, FuzzyScore>);
aligner.tree = this.tree;

Expand Down

0 comments on commit 680ce7a

Please sign in to comment.