mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
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:
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user