@churchillliving/se-ui-toolkit 6.53.88 → 6.53.89
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 +10 -1
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/services/form.service.js +9 -2
- package/fesm2015/churchillliving-se-ui-toolkit.js +8 -1
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/services/form.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5808,8 +5808,17 @@
|
|
|
5808
5808
|
return this.addFormField(fieldInfo);
|
|
5809
5809
|
};
|
|
5810
5810
|
// Search AutoComplete Data for form
|
|
5811
|
-
FormService.prototype.getAutoCompleteData = function (formField, uniqueKey, filters) {
|
|
5811
|
+
FormService.prototype.getAutoCompleteData = function (formField, uniqueKey, filters, search) {
|
|
5812
|
+
if (search === void 0) { search = ''; }
|
|
5812
5813
|
this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
|
|
5814
|
+
var _e;
|
|
5815
|
+
if (search) {
|
|
5816
|
+
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()); });
|
|
5817
|
+
console.log('existInRecord: ', existInRecord);
|
|
5818
|
+
if (!existInRecord) {
|
|
5819
|
+
response.records.unshift((_e = {}, _e[formField.displayField] = search, _e));
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5813
5822
|
formField.data = __spreadArray([], __read(response.records));
|
|
5814
5823
|
});
|
|
5815
5824
|
};
|