@messaia/cdk 12.3.5-rc20 → 12.3.5-rc21

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.
@@ -14065,10 +14065,15 @@
14065
14065
  var _a, _b, _c, _d;
14066
14066
  this.fieldRows = (_b = (_a = this.fieldGroups) === null || _a === void 0 ? void 0 : _a.filter(function (x) { var _a, _b; return ((_a = x.name) === null || _a === void 0 ? void 0 : _a.trim()) == ((_b = _this.groupName) === null || _b === void 0 ? void 0 : _b.trim()); })[0]) === null || _b === void 0 ? void 0 : _b.groups;
14067
14067
  (_d = (_c = this.fieldRows) === null || _c === void 0 ? void 0 : _c.filter(function (x) { return x.some(function (y) { return y.type == exports.FormFieldType.Autocomplete; }); })[0]) === null || _d === void 0 ? void 0 : _d.forEach(function (x) {
14068
- _this.formGroup.controls[x.name].valueChanges.subscribe(function (y) {
14069
- var _a;
14070
- _this.autocompleteFilteredOptions[x.name] = (_a = x.options) === null || _a === void 0 ? void 0 : _a.filter(function (option) { return option.name.toLowerCase().includes(y); });
14071
- });
14068
+ var _a, _b;
14069
+ var control = _this.formGroup.controls[x.name];
14070
+ if (control) {
14071
+ _this.autocompleteFilteredOptions[x.name] = !((_a = control.value) === null || _a === void 0 ? void 0 : _a.length) ? x.options : (_b = x.options) === null || _b === void 0 ? void 0 : _b.filter(function (option) { return option.name.toLowerCase().includes(control.value.toLowerCase()); });
14072
+ control.valueChanges.subscribe(function (y) {
14073
+ var _a;
14074
+ _this.autocompleteFilteredOptions[x.name] = (_a = x.options) === null || _a === void 0 ? void 0 : _a.filter(function (option) { return option.name.toLowerCase().includes(y.toLowerCase()); });
14075
+ });
14076
+ }
14072
14077
  });
14073
14078
  };
14074
14079
  return VdGenericFormComponent;