@esfaenza/forms-and-validations 15.2.56 → 15.2.57

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.
@@ -3791,18 +3791,22 @@ class FormAutocompleteComponent extends BaseFormControl {
3791
3791
  onFailure?.();
3792
3792
  return;
3793
3793
  }
3794
- this.doSearchProtected(tmpModel, true, this.SearchFunctionContext, (t) => {
3795
- if (t && t.length > 0) {
3796
- this.Source = t;
3797
- this.tryBindSourceDisplay();
3798
- if (!this.Multi)
3799
- setTimeout(() => { this.finalizeValue(tmpModel); });
3794
+ this.log("filtersource enqueue");
3795
+ this.throttla("filtersource", () => {
3796
+ this.log("filtersource fire");
3797
+ this.doSearchProtected(tmpModel, true, this.SearchFunctionContext, (t) => {
3798
+ if (t && t.length > 0) {
3799
+ this.Source = t;
3800
+ this.tryBindSourceDisplay();
3801
+ if (!this.Multi)
3802
+ setTimeout(() => { this.finalizeValue(tmpModel); });
3803
+ else
3804
+ this.cdr.markForCheck();
3805
+ }
3800
3806
  else
3801
- this.cdr.markForCheck();
3802
- }
3803
- else
3804
- onFailure?.();
3805
- });
3807
+ onFailure?.();
3808
+ });
3809
+ }, 400);
3806
3810
  }
3807
3811
  /**
3808
3812
  * Evento di filtro della sorgente dati in base all'input utente