@churchillliving/se-ui-toolkit 6.53.378 → 6.53.380

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.
@@ -3114,8 +3114,9 @@
3114
3114
  };
3115
3115
  return column;
3116
3116
  };
3117
- GridService.prototype.setLookUpFilter = function (column, dialogService) {
3117
+ GridService.prototype.setLookUpFilter = function (column, dialogService, globalFilterLookup) {
3118
3118
  var _this = this;
3119
+ if (globalFilterLookup === void 0) { globalFilterLookup = false; }
3119
3120
  var _a, _b;
3120
3121
  if (column.lookupControl) {
3121
3122
  var dataValue_1 = [];
@@ -3150,9 +3151,16 @@
3150
3151
  (_a = document.getElementById('lookUp_filter')) === null || _a === void 0 ? void 0 : _a.focus();
3151
3152
  var field = column.field;
3152
3153
  var value = setDialogResponse(column, column === null || column === void 0 ? void 0 : column.lookupControl, res);
3153
- column.filterValue = (value === null || value === void 0 ? void 0 : value.value)
3154
- ? value.value
3155
- : res[field.toLowerCase()];
3154
+ if (globalFilterLookup) {
3155
+ column.value = (value === null || value === void 0 ? void 0 : value.value)
3156
+ ? value.value
3157
+ : res[field.toLowerCase()];
3158
+ }
3159
+ else {
3160
+ column.filterValue = (value === null || value === void 0 ? void 0 : value.value)
3161
+ ? value.value
3162
+ : res[field.toLowerCase()];
3163
+ }
3156
3164
  }
3157
3165
  }, function (_g) {
3158
3166
  var error = _g.error;
@@ -3425,17 +3433,17 @@
3425
3433
  };
3426
3434
  // set grid data and set selected row based on selection value
3427
3435
  GridService.prototype.setDataWithSelectedRow = function (records, configData) {
3428
- if ((configData === null || configData === void 0 ? void 0 : configData.valueProp) && configData.data.selection) {
3436
+ if (((configData === null || configData === void 0 ? void 0 : configData.valueProp) || (configData === null || configData === void 0 ? void 0 : configData.labelProp)) && configData.data.selection) {
3429
3437
  records.forEach(function (record) {
3430
3438
  var _a;
3431
3439
  (_a = Object.keys(record)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {
3432
- var _a, _b;
3433
- if (key.toLowerCase() === configData.valueProp.toLowerCase()) {
3440
+ var _a, _b, _c, _d;
3441
+ if (key.toLowerCase() === configData.labelProp ? (_a = configData.labelProp) === null || _a === void 0 ? void 0 : _a.toLowerCase() : (_b = configData.valueProp) === null || _b === void 0 ? void 0 : _b.toLowerCase()) {
3434
3442
  if (configData.data.value &&
3435
3443
  record[key] === configData.data.value) {
3436
3444
  record['highlightRow'] = true;
3437
3445
  }
3438
- else if (((_a = record[key]) === null || _a === void 0 ? void 0 : _a.toString()) === ((_b = configData.data.selection) === null || _b === void 0 ? void 0 : _b.toString())) {
3446
+ else if (((_c = record[key]) === null || _c === void 0 ? void 0 : _c.toString()) === ((_d = configData.data.selection) === null || _d === void 0 ? void 0 : _d.toString())) {
3439
3447
  record['highlightRow'] = true;
3440
3448
  }
3441
3449
  }
@@ -9760,7 +9768,7 @@
9760
9768
  * open dialog on lookupControl field
9761
9769
  */
9762
9770
  SeGlobalFilterComponent.prototype.selectLookupField = function (globalFilters) {
9763
- this.gridService.setLookUpFilter(globalFilters, this.dialogService);
9771
+ this.gridService.setLookUpFilter(globalFilters, this.dialogService, true);
9764
9772
  };
9765
9773
  /**
9766
9774
  * Clear all filter values