@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.
- package/bundles/churchillliving-se-ui-toolkit.umd.js +11 -3
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/services/form.service.js +2 -3
- package/esm2015/lib/services/grid.service.js +9 -2
- package/fesm2015/churchillliving-se-ui-toolkit.js +9 -3
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/services/grid.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
}
|