added group container (#1508)

This commit is contained in:
Leila Lali
2018-05-29 13:08:13 -07:00
committed by GitHub
parent 8fce79f385
commit a13039b14b
12 changed files with 239 additions and 61 deletions

View File

@@ -105,6 +105,12 @@ export abstract class ComponentBase extends Disposable implements IComponent, On
return <boolean>enabled;
}
public set enabled(value: boolean) {
let properties = this.getProperties();
properties['enabled'] = value;
this.setProperties(properties);
}
public get valid(): boolean {
return this._valid;
}
@@ -173,5 +179,15 @@ export abstract class ContainerBase<T> extends ComponentBase {
this._changeRef.detectChanges();
}
public setProperties(properties: { [key: string]: any; }): void {
super.setProperties(properties);
this.items.forEach(item => {
let component = this.modelStore.getComponent(item.descriptor.id);
if (component) {
component.enabled = this.enabled;
}
});
}
abstract setLayout(layout: any): void;
}