Re Added visibility feature

This commit is contained in:
Vito Albano
2016-08-20 12:55:59 +01:00
parent c4f6276b69
commit de62e8181e
20 changed files with 150 additions and 64 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Input, AfterViewInit } from '@angular/core';
import { Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
import { FormFieldModel } from './core/index';
declare let __moduleName: string;
@@ -29,6 +29,9 @@ export class WidgetComponent implements AfterViewInit {
@Input()
field: FormFieldModel;
@Output()
fieldChanged: EventEmitter<FormFieldModel> = new EventEmitter<FormFieldModel>();
hasField() {
return this.field ? true : false;
}
@@ -46,4 +49,8 @@ export class WidgetComponent implements AfterViewInit {
return false;
}
checkVisibility(field: FormFieldModel) {
this.fieldChanged.emit(field);
}
}