Add name property for DacFx wizard edit text boxes (#6775)

* add name property for file location edit and version edit

* add aria label property for drop down component

* remove 'Edit' from aria labels
This commit is contained in:
Kim Santiago
2019-08-19 14:36:13 -07:00
committed by GitHub
parent 0be1cf8b73
commit 87b0e08a6a
6 changed files with 36 additions and 10 deletions

View File

@@ -1191,6 +1191,13 @@ class DropDownWrapper extends ComponentWrapper implements azdata.DropDownCompone
this.setProperty('fireOnTextChange', v);
}
public get ariaLabel(): string {
return this.properties['ariaLabel'];
}
public set ariaLabel(v: string) {
this.setProperty('ariaLabel', v);
}
public get onValueChanged(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onDidChange);
return emitter && emitter.event;

View File

@@ -106,6 +106,11 @@ export default class DropDownComponent extends ComponentBase implements ICompone
public setProperties(properties: { [key: string]: any; }): void {
super.setProperties(properties);
if (this.ariaLabel !== '') {
this._selectBox.setAriaLabel(this.ariaLabel);
}
if (this.editable) {
this._editableDropdown.values = this.getValues();
if (this.value) {
@@ -175,6 +180,10 @@ export default class DropDownComponent extends ComponentBase implements ICompone
return this.getPropertyOrDefault<azdata.DropDownProperties, boolean>((props) => props.fireOnTextChange, false);
}
private get ariaLabel(): string {
return this.getPropertyOrDefault<azdata.DropDownProperties, string>((props) => props.ariaLabel, '');
}
public getEditableDisplay(): string {
return this.editable ? '' : 'none';
}