@klippa/ngx-enhancy-forms 5.3.1 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/klippa-ngx-enhancy-forms.umd.js +17 -10
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/form/form.component.js +9 -3
- package/fesm2015/klippa-ngx-enhancy-forms.js +8 -2
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/package.json +1 -1
|
@@ -59,20 +59,27 @@
|
|
|
59
59
|
this.activeControls = [];
|
|
60
60
|
}
|
|
61
61
|
FormComponent.prototype.ngOnInit = function () {
|
|
62
|
+
var _this = this;
|
|
62
63
|
if (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
if (
|
|
66
|
-
if (typeof
|
|
67
|
-
throw new Error("cannot index FormArray with " + typeof
|
|
64
|
+
var injectInto_1 = this.subFormPlaceholder.injectInto;
|
|
65
|
+
var injectAt_1 = this.subFormPlaceholder.at;
|
|
66
|
+
if (injectInto_1 instanceof forms.FormArray) {
|
|
67
|
+
if (typeof injectAt_1 !== 'number') {
|
|
68
|
+
throw new Error("cannot index FormArray with " + typeof injectAt_1);
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
// do this next cycle to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
|
|
71
|
+
setTimeout(function () {
|
|
72
|
+
injectInto_1.setControl(injectAt_1, _this.formGroup);
|
|
73
|
+
});
|
|
70
74
|
}
|
|
71
|
-
else if (
|
|
72
|
-
if (typeof
|
|
73
|
-
throw new Error("cannot index FormGroup with " + typeof
|
|
75
|
+
else if (injectInto_1 instanceof forms.FormGroup) {
|
|
76
|
+
if (typeof injectAt_1 !== 'string') {
|
|
77
|
+
throw new Error("cannot index FormGroup with " + typeof injectAt_1);
|
|
74
78
|
}
|
|
75
|
-
|
|
79
|
+
// do this next cycle to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
|
|
80
|
+
setTimeout(function () {
|
|
81
|
+
injectInto_1.setControl(injectAt_1, _this.formGroup);
|
|
82
|
+
});
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
85
|
if (isValueSet(this.patchValueInterceptor)) {
|