Use faster, editable dropdown for Collations in database dialogs (#23974)

* Also fixed an issue where a manually edited text field doesn't get updated when selecting the same dropdown value from before the manual edit.
---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Cory Rivera
2023-07-26 10:04:29 -07:00
committed by GitHub
parent 5f1801d6d4
commit cc778ad69f
7 changed files with 67 additions and 32 deletions

View File

@@ -81,7 +81,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
if (this._editableDropDownContainer) {
let dropdownOptions: IDropdownOptions = {
values: [],
strictSelection: false,
strictSelection: this.strictSelection ?? false,
placeholder: this.placeholder,
maxHeight: 125,
ariaLabel: '',
@@ -178,7 +178,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
}
this._editableDropdown.enabled = this.enabled;
this._editableDropdown.fireOnTextChange = this.fireOnTextChange;
this._editableDropdown.strictSelection = this.strictSelection;
if (this.placeholder) {
this._editableDropdown.input.setPlaceHolder(this.placeholder);
}
@@ -338,7 +338,11 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
}
public get placeholder(): string | undefined {
return this.getPropertyOrDefault<string>((props) => props.placeholder, undefined);
return this.getPropertyOrDefault<string | undefined>((props) => props.placeholder, undefined);
}
public get strictSelection(): boolean | undefined {
return this.getPropertyOrDefault<boolean | undefined>((props) => props.strictSelection, undefined);
}
public get validationErrorMessages(): string[] | undefined {