@klippa/ngx-enhancy-forms 20.0.1 → 20.0.3
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.
|
@@ -402,10 +402,13 @@ class FormComponent {
|
|
|
402
402
|
}
|
|
403
403
|
return current;
|
|
404
404
|
}
|
|
405
|
-
unregisterControl(formControl) {
|
|
406
|
-
this.activeControls
|
|
405
|
+
unregisterControl(formControl, formElement) {
|
|
406
|
+
console.log('this.activeControls before', this.activeControls.length);
|
|
407
|
+
console.log(this.activeControls);
|
|
408
|
+
this.activeControls = this.activeControls.filter((e) => e.formControl !== formControl || e.formElement !== formElement);
|
|
409
|
+
console.log('this.activeControls after', this.activeControls.length);
|
|
407
410
|
if (this.parent) {
|
|
408
|
-
this.parent.unregisterControl(formControl);
|
|
411
|
+
this.parent.unregisterControl(formControl, formElement);
|
|
409
412
|
}
|
|
410
413
|
}
|
|
411
414
|
addFormGroupControls(formGroup, result) {
|
|
@@ -793,7 +796,7 @@ class FormElementComponent {
|
|
|
793
796
|
}
|
|
794
797
|
unregisterControl(formControl) {
|
|
795
798
|
this.attachedControl = null;
|
|
796
|
-
this.parent.unregisterControl(formControl);
|
|
799
|
+
this.parent.unregisterControl(formControl, this);
|
|
797
800
|
}
|
|
798
801
|
getAttachedControl() {
|
|
799
802
|
return this.attachedControl;
|