|
@@ -56,7 +56,7 @@ export class DynafieldDirective extends NgControl implements OnInit, OnDestroy {
|
|
|
private container: ViewContainerRef,
|
|
|
@SkipSelf() private cc: ControlContainer,
|
|
|
@Optional() @Self() @Inject(NG_VALIDATORS) private validators: Array<Validator | ValidatorFn>,
|
|
|
- @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) private asyncValidators: Array<AsyncValidatorFn>
|
|
|
+ @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) private asyncValidators: AsyncValidatorFn[]
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
@@ -84,7 +84,7 @@ export class DynafieldDirective extends NgControl implements OnInit, OnDestroy {
|
|
|
// Support the recursive insertion of Dynaform components
|
|
|
if (type === 'DynaformComponent') {
|
|
|
if (meta.template) {
|
|
|
- (<any>instance).template = meta.template;
|
|
|
+ (instance as any).template = meta.template;
|
|
|
}
|
|
|
meta = meta.meta;
|
|
|
}
|
|
@@ -106,7 +106,7 @@ export class DynafieldDirective extends NgControl implements OnInit, OnDestroy {
|
|
|
el.id = cssId;
|
|
|
}
|
|
|
if (cssClass) {
|
|
|
- const classesToAdd = Array.isArray(cssClass) ? cssClass : [cssClass];
|
|
|
+ const classesToAdd = Array.isArray(cssClass) ? cssClass : [...cssClass.split(/\s+/)];
|
|
|
el.classList.add(...classesToAdd);
|
|
|
}
|
|
|
|
|
@@ -115,7 +115,7 @@ export class DynafieldDirective extends NgControl implements OnInit, OnDestroy {
|
|
|
// We're dealing with a custom form control which implements the ControlValueAccessor interface,
|
|
|
// so we need to wire it up!
|
|
|
this.name = name;
|
|
|
- this.valueAccessor = <FFCCustom>this.component.instance;
|
|
|
+ this.valueAccessor = this.component.instance as FFCCustom;
|
|
|
// Attach sync validators
|
|
|
/*
|
|
|
const ngValidators = this.component.injector.get(NG_VALIDATORS, null);
|