Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Imms <tyriar@tyriar.com>2018-10-10 21:56:31 +0300
committerGitHub <noreply@github.com>2018-10-10 21:56:31 +0300
commit3f23ae9e5d3190dd80e1703fa6e02497438457b4 (patch)
tree38f59c74dd9d940175a6488f46524b1e2c49369a
parent7d9711259c26dd624d1d265f873cee35d0055922 (diff)
parent83106c5b7f9e636eb937932cdabdbe053b126eb1 (diff)
Merge pull request #60545 from Microsoft/tyriar/1.28/59876
Apply selection even when the items don't change
-rw-r--r--src/vs/base/browser/ui/selectBox/selectBoxCustom.ts13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
index 3d5b2f79cfa..fe455555e10 100644
--- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
@@ -250,7 +250,6 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
}
public setOptions(options: string[], selected?: number, disabled?: number): void {
-
if (!this.options || !arrays.equals(this.options, options)) {
this.options = options;
this.selectElement.options.length = 0;
@@ -260,18 +259,16 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
this.selectElement.add(this.createOption(option, i, disabled === i++));
});
- if (selected !== undefined) {
- this.select(selected);
- // Set current = selected since this is not necessarily a user exit
- this._currentSelection = this.selected;
- }
-
if (disabled !== undefined) {
this.disabledOptionIndex = disabled;
}
}
-
+ if (selected !== undefined) {
+ this.select(selected);
+ // Set current = selected since this is not necessarily a user exit
+ this._currentSelection = this.selected;
+ }
}