added text component (#1462)

* added text component
This commit is contained in:
Leila Lali
2018-05-22 16:12:02 -07:00
committed by GitHub
parent 4bfc549927
commit 1461929f86
6 changed files with 109 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
this._register(this._input);
this._register(this._input.onClicked(e => {
this.checked = this._input.checked;
this._onEventEmitter.fire({
eventType: ComponentEventType.onDidClick,
args: e
@@ -89,8 +90,12 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
return this.getPropertyOrDefault<sqlops.RadioButtonProperties, boolean>((props) => props.checked, false);
}
public set checked(newValue: boolean) {
this.setPropertyFromUI<sqlops.RadioButtonProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
}
public set value(newValue: string) {
this.setPropertyFromUI<sqlops.RadioButtonProperties, string>((properties, value) => { properties.checked = value; }, newValue);
this.setPropertyFromUI<sqlops.RadioButtonProperties, string>((properties, value) => { properties.value = value; }, newValue);
}
public get value(): string {