@churchillliving/se-ui-toolkit 6.53.96 → 6.53.97

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.
@@ -2614,9 +2614,18 @@
2614
2614
  return this.addColumn(columnInfo);
2615
2615
  };
2616
2616
  // Search AutoComplete Data for Grid
2617
- GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters) {
2617
+ GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters, search) {
2618
2618
  var _this = this;
2619
+ if (search === void 0) { search = ''; }
2619
2620
  this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
2621
+ var _g;
2622
+ var _a;
2623
+ if (search) {
2624
+ var existInRecord = (_a = response.records) === null || _a === void 0 ? void 0 : _a.some(function (record) { var _a, _b; return record[column.displayField] && ((_b = (_a = record[column.displayField]) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (search === null || search === void 0 ? void 0 : search.toLowerCase()); });
2625
+ if (!existInRecord) {
2626
+ response.records.unshift((_g = {}, _g[column.displayField] = search, _g));
2627
+ }
2628
+ }
2620
2629
  column.data = _this.setDataFields(response.records);
2621
2630
  });
2622
2631
  };
@@ -5829,8 +5838,7 @@
5829
5838
  this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
5830
5839
  var _e;
5831
5840
  if (search) {
5832
- var existInRecord = response.records.some(function (record) { var _a, _b, _c; return record[formField.displayField] && ((_b = (_a = record[formField.displayField]) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_c = search === null || search === void 0 ? void 0 : search.toString()) === null || _c === void 0 ? void 0 : _c.toLowerCase()); });
5833
- console.log('existInRecord: ', existInRecord);
5841
+ var existInRecord = response.records.some(function (record) { var _a, _b; return record[formField.displayField] && ((_b = (_a = record[formField.displayField]) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (search === null || search === void 0 ? void 0 : search.toLowerCase()); });
5834
5842
  if (!existInRecord) {
5835
5843
  response.records.unshift((_e = {}, _e[formField.displayField] = search, _e));
5836
5844
  }