mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user