fixed several model view issues (#1640)

* fixed several model view issues
This commit is contained in:
Leila Lali
2018-06-15 16:59:12 -07:00
committed by GitHub
parent ab39f1f44f
commit a225925bc4
18 changed files with 238 additions and 130 deletions

View File

@@ -50,7 +50,7 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
this._register(this._input);
this._register(this._input.onChange(e => {
this.value = this._input.checked;
this.checked = this._input.checked;
this._onEventEmitter.fire({
eventType: ComponentEventType.onDidChange,
args: e
@@ -88,10 +88,10 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
// CSS-bound properties
public get checked(): boolean {
return this.getPropertyOrDefault<sqlops.CheckBoxProperties, boolean>((props) => props.value, false);
return this.getPropertyOrDefault<sqlops.CheckBoxProperties, boolean>((props) => props.checked, false);
}
public set value(newValue: boolean) {
public set checked(newValue: boolean) {
this.setPropertyFromUI<sqlops.CheckBoxProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
}