mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
fix selected state of select boxes (#19743)
* fix the selected state * add comments * validate parameters
This commit is contained in:
@@ -315,6 +315,8 @@ export class Dropdown extends Disposable implements IListVirtualDelegate<string>
|
||||
|
||||
private _updateDropDownList(): void {
|
||||
this._selectList.splice(0, this._selectList.length, this._dataSource.filteredValues.map(v => { return { text: v }; }));
|
||||
const selectedIndex = this._dataSource.filteredValues.indexOf(this.value);
|
||||
this._selectList.setSelection(selectedIndex !== -1 ? [selectedIndex] : []);
|
||||
|
||||
let width = this._inputContainer.clientWidth;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user