fix issue where tree item doesn't expand when collapsible state is expanded (#2212)

This commit is contained in:
Abbie Petchtes
2018-08-13 09:59:26 -07:00
committed by GitHub
parent 8f06e72318
commit 2b68e4a7df
2 changed files with 5 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ export class TreeNode implements sqlops.TreeComponentItem {
public get collapsibleState(): vscode.TreeItemCollapsibleState {
if (!this._isAlwaysLeaf) {
return vscode.TreeItemCollapsibleState.Collapsed;
return vscode.TreeItemCollapsibleState.Expanded;
} else {
vscode.TreeItemCollapsibleState.None;
}

View File

@@ -55,4 +55,8 @@ export class TreeComponentDataSource implements IDataSource {
public getParent(tree: ITree, node: any): TPromise<any> {
return TPromise.as(null);
}
public shouldAutoexpand(tree: ITree, node: ITreeComponentItem): boolean {
return node.collapsibleState === TreeItemCollapsibleState.Expanded;
}
}