@esfaenza/forms-and-validations 11.2.133 → 11.2.135

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.
@@ -3721,7 +3721,7 @@
3721
3721
  if (!value)
3722
3722
  return;
3723
3723
  if (this.SearchFunction) {
3724
- this.SearchFunction(value, true).subscribe(function (t) {
3724
+ this.SearchFunction(value, true, this.SearchFunctionContext).subscribe(function (t) {
3725
3725
  _this.Source = t;
3726
3726
  _this.tryBindSourceDisplay();
3727
3727
  setTimeout(function () { _this.finalizeValue(value); });
@@ -3756,9 +3756,9 @@
3756
3756
  FormAutocompleteComponent.prototype.evaluateIdResearch = function () {
3757
3757
  var _this = this;
3758
3758
  var tmpModel = this.Model;
3759
- if (!tmpModel)
3759
+ if (!tmpModel || !this.SearchFunction)
3760
3760
  return;
3761
- this.SearchFunction(tmpModel, true).subscribe(function (t) {
3761
+ this.SearchFunction(tmpModel, true, this.SearchFunctionContext).subscribe(function (t) {
3762
3762
  if (t && t.length > 0) {
3763
3763
  _this.Source = t;
3764
3764
  _this.tryBindSourceDisplay();
@@ -3796,7 +3796,7 @@
3796
3796
  throw "Impossibile filtrare gli elementi senza una funzione di ricerca che restituisca una lista di { id: string, description: string }";
3797
3797
  if (this.SearchFunction) {
3798
3798
  this.throttla("filtersource", function () {
3799
- _this.SearchFunction(event, false).subscribe(function (t) {
3799
+ _this.SearchFunction(event, false, _this.SearchFunctionContext).subscribe(function (t) {
3800
3800
  _this.Source = t;
3801
3801
  _this.tryBindSourceDisplay();
3802
3802
  // In questo caso è già filtrata dalla SearchFunction
@@ -3886,6 +3886,7 @@
3886
3886
  ]; };
3887
3887
  FormAutocompleteComponent.propDecorators = {
3888
3888
  SelectLabel: [{ type: core.Input }],
3889
+ SearchFunctionContext: [{ type: core.Input }],
3889
3890
  SearchFunction: [{ type: core.Input }],
3890
3891
  MinChars: [{ type: core.Input }],
3891
3892
  HideChoicesOnSelection: [{ type: core.Input }],