@esfaenza/forms-and-validations 11.2.46 → 11.2.47

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.
@@ -1976,6 +1976,14 @@
1976
1976
  };
1977
1977
  }
1978
1978
  };
1979
+ /**
1980
+ * Se sono in modalità detatched devo rimuovere manualmente questo controllo quando entro nella dispose, altrimenti se poi ne andassi a riaggiungere
1981
+ * un altro con lo stesso "name" ma magari resettato, Angular lo re-idraterebbe con i valori precedenti nonostante il modello fosse vuoto
1982
+ */
1983
+ BaseFormControl.prototype.ngOnDestroy = function () {
1984
+ if (this.detatchedFromform && this.Form)
1985
+ this.Form.removeControl(this.validationControl);
1986
+ };
1979
1987
  /**
1980
1988
  * Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno
1981
1989
  */