Fix account and tenant selection behavior (#21749)

This commit is contained in:
Cheena Malhotra
2023-01-27 11:47:24 -08:00
committed by GitHub
parent b273cf5a65
commit 895b43f36a
2 changed files with 31 additions and 12 deletions

View File

@@ -193,14 +193,14 @@ export class SelectBox extends vsSelectBox {
this.applyStyles();
}
public selectWithOptionName(optionName?: string): void {
public selectWithOptionName(optionName?: string, selectFirstByDefault: boolean = true): void {
let option: number | undefined;
if (optionName !== undefined) {
option = this._optionsDictionary.get(optionName);
}
if (option !== undefined) {
this.select(option);
} else {
} else if (selectFirstByDefault) {
this.select(0);
}
}