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

@@ -342,7 +342,6 @@ class InternalItemConfig {
}
}
class ComponentWrapper implements sqlops.Component {
public properties: { [key: string]: any } = {};
public layout: any;
@@ -385,6 +384,22 @@ class ComponentWrapper implements sqlops.Component {
this.setProperty('enabled', value);
}
public get height(): number | string {
return this.properties['height'];
}
public set height(v: number | string) {
this.setProperty('height', v);
}
public get width(): number | string {
return this.properties['width'];
}
public set width(v: number | string) {
this.setProperty('width', v);
}
public toComponentShape(): IComponentShape {
return <IComponentShape>{
id: this.id,
@@ -553,13 +568,6 @@ class InputBoxWrapper extends ComponentWrapper implements sqlops.InputBoxCompone
this.setProperty('placeHolder', v);
}
public get height(): number {
return this.properties['height'];
}
public set height(v: number) {
this.setProperty('height', v);
}
public get rows(): number {
return this.properties['rows'];
}
@@ -588,13 +596,6 @@ class InputBoxWrapper extends ComponentWrapper implements sqlops.InputBoxCompone
this.setProperty('columns', v);
}
public get width(): number {
return this.properties['width'];
}
public set width(v: number) {
this.setProperty('width', v);
}
public get multiline(): boolean {
return this.properties['multiline'];
}
@@ -777,10 +778,10 @@ class DropDownWrapper extends ComponentWrapper implements sqlops.DropDownCompone
this.setProperty('value', v);
}
public get values(): string[] {
public get values(): string[] | sqlops.CategoryValue[] {
return this.properties['values'];
}
public set values(v: string[]) {
public set values(v: string[] | sqlops.CategoryValue[]) {
this.setProperty('values', v);
}