@esfaenza/forms-and-validations 11.2.132 → 11.2.133

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.
@@ -1955,7 +1955,7 @@
1955
1955
  /** Indica se il campo è obbligatorio i opzionale */
1956
1956
  this.Required = false;
1957
1957
  /** Indica se il Form che contiene questo campo è già stato registrato */
1958
- this.formHasBennBound = false;
1958
+ this.formHasBeenBound = false;
1959
1959
  /** @ignore */
1960
1960
  this.propagateChange = function (_) { };
1961
1961
  /** @ignore */
@@ -2219,9 +2219,9 @@
2219
2219
  this.GeneratedName = this.ngControl.name.toString() + "_internal";
2220
2220
  // ATTENZIONE: QUALSIASI SIA IL MOTIVO, SE STO COSO VIENE SPOSTATO DALL ngOnInit NON FUNZIONA PIU NULLA
2221
2221
  if (this.Form) {
2222
- if (!this.formHasBennBound && this.validationControl) {
2222
+ if (!this.formHasBeenBound && this.validationControl) {
2223
2223
  this.Form.addControl(this.validationControl);
2224
- this.formHasBennBound = true;
2224
+ this.formHasBeenBound = true;
2225
2225
  }
2226
2226
  // Quando un form viene submittato la variabile Form.submitted viene assegnata all'input [submitted] del val-control
2227
2227
  // Essendo che però la CD è OnPush per dire ad Angular che l'Input è cambiato e permettere i sideffects di assegnare [submitted]
@@ -2307,9 +2307,9 @@
2307
2307
  if (this.UseUserValidators)
2308
2308
  this.validationControl.control.setValidators(this._validators);
2309
2309
  //Se sono staccato dal Form (vuol dire che sono ad esempio dentro un ng-template) aggiungo il controllo al Form passato come input (context del template)
2310
- if (this.Form && !this.formHasBennBound) {
2310
+ if (this.Form && !this.formHasBeenBound) {
2311
2311
  this.Form.addControl(this.validationControl);
2312
- this.formHasBennBound = true;
2312
+ this.formHasBeenBound = true;
2313
2313
  }
2314
2314
  if (this.ngControl)
2315
2315
  this.bindResetFunction();
@@ -2320,7 +2320,7 @@
2320
2320
  BaseFormControl.prototype.registerForm = function (ngForm) {
2321
2321
  this.Form = ngForm;
2322
2322
  this.Form.addControl(this.validationControl);
2323
- this.formHasBennBound = true;
2323
+ this.formHasBeenBound = true;
2324
2324
  };
2325
2325
  /**
2326
2326
  * Aggiorna il valore e la validità dell'input sottostante. Non viene chiamato per input nativi come le checkbox
@@ -2801,7 +2801,7 @@
2801
2801
  this.FilteredBoundSource = this.BoundSource;
2802
2802
  return;
2803
2803
  }
2804
- if (!event || event.length < this.MinChars) {
2804
+ if (!event || event.value.length < this.MinChars) {
2805
2805
  this.FilteredBoundSource = [];
2806
2806
  return;
2807
2807
  }
@@ -2809,7 +2809,7 @@
2809
2809
  throw "Impossibile filtrare gli elementi senza una funzione di ricerca che restituisca una lista di { id: string, description: string }";
2810
2810
  if (this.SearchFunction) {
2811
2811
  this.throttla("filtersource", function () {
2812
- _this.SearchFunction(event, false).subscribe(function (t) {
2812
+ _this.SearchFunction(event.value, false).subscribe(function (t) {
2813
2813
  _this.Source = t;
2814
2814
  _this.tryBindSourceDisplay();
2815
2815
  // In questo caso è già filtrata dalla SearchFunction
@@ -2822,7 +2822,7 @@
2822
2822
  else {
2823
2823
  this.throttla("filtersource", function () {
2824
2824
  // In questo caso devo filtrare io in memoria
2825
- _this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return (_this.CaseSensitive && t.description.includes(event)) || (!_this.CaseSensitive && t.description.toLowerCase().includes(event.toLowerCase())); });
2825
+ _this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return (_this.CaseSensitive && t.description.includes(event.value)) || (!_this.CaseSensitive && t.description.toLowerCase().includes(event.value.toLowerCase())); });
2826
2826
  _this.removeFilteredSourceOnDescriptionSelection();
2827
2827
  _this.cdr.markForCheck();
2828
2828
  }, 100);