added radio button model view component (#1439)

* added radio button model view component
This commit is contained in:
Leila Lali
2018-05-21 11:45:27 -07:00
committed by GitHub
parent 5de002e5c1
commit ba264d8311
12 changed files with 389 additions and 36 deletions

View File

@@ -78,6 +78,11 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
super.setProperties(properties);
this._input.checked = this.checked;
this._input.label = this.label;
if (this.enabled) {
this._input.enable();
} else {
this._input.disable();
}
}
// CSS-bound properties
@@ -87,11 +92,7 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
}
public set value(newValue: boolean) {
this.setPropertyFromUI<sqlops.CheckBoxProperties, boolean>(this.setInputBoxProperties, newValue);
}
private setInputBoxProperties(properties: sqlops.CheckBoxProperties, value: boolean): void {
properties.checked = value;
this.setPropertyFromUI<sqlops.CheckBoxProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
}
private get label(): string {
@@ -99,10 +100,6 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
}
private set label(newValue: string) {
this.setPropertyFromUI<sqlops.CheckBoxProperties, string>(this.setValueProperties, newValue);
}
private setValueProperties(properties: sqlops.CheckBoxProperties, label: string): void {
properties.label = label;
this.setPropertyFromUI<sqlops.CheckBoxProperties, string>((properties, label) => { properties.label = label; }, newValue);
}
}