added 'fireOnTextChange' field to azdata.proposed.d.ts (#4341)

This commit is contained in:
Gene Lee
2019-03-07 16:03:50 -08:00
committed by GitHub
parent 96a976d826
commit 36e5bbb752
4 changed files with 14 additions and 1 deletions

View File

@@ -2940,6 +2940,7 @@ declare module 'azdata' {
value?: string | CategoryValue;
values?: string[] | CategoryValue[];
editable?: boolean;
fireOnTextChange?: boolean;
}
export interface DeclarativeTableColumn {

View File

@@ -112,7 +112,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
this._editableDropdown.value = this.getSelectedValue();
}
this._editableDropdown.enabled = this.enabled;
this._editableDropdown.fireOnTextChange = properties['fireOnTextChange'];
this._editableDropdown.fireOnTextChange = this.fireOnTextChange;
} else {
this._selectBox.setOptions(this.getValues());
this._selectBox.selectWithOptionName(this.getSelectedValue());
@@ -171,6 +171,10 @@ export default class DropDownComponent extends ComponentBase implements ICompone
return this.getPropertyOrDefault<azdata.DropDownProperties, boolean>((props) => props.editable, false);
}
private get fireOnTextChange(): boolean {
return this.getPropertyOrDefault<azdata.DropDownProperties, boolean>((props) => props.fireOnTextChange, false);
}
public getEditableDisplay(): string {
return this.editable ? '' : 'none';
}

View File

@@ -560,6 +560,7 @@ declare module 'sqlops' {
value?: string | CategoryValue;
values?: string[] | CategoryValue[];
editable?: boolean;
fireOnTextChange?: boolean;
}
export interface DeclarativeTableColumn {

View File

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