@datorama/core 21.4.0-rc.11 → 21.4.0-rc.12

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.
@@ -11421,7 +11421,7 @@ var GridQuery = /** @class */ (function (_super) {
11421
11421
  return Object.keys(filter).reduce(function (filters, field) {
11422
11422
  var datoFilter = filter[field];
11423
11423
  if (datoFilter) {
11424
- filters.push({ colId: datoFilter.colId, field: field, filter: datoFilter });
11424
+ filters.push({ field: field, filter: datoFilter });
11425
11425
  }
11426
11426
  return filters;
11427
11427
  }, []);
@@ -12667,7 +12667,7 @@ var DatoGridFilterComponent = /** @class */ (function () {
12667
12667
  var columnValues = this.getColumnValues();
12668
12668
  this.columnValues = columnValues.map(function (_a) {
12669
12669
  var value = _a.value;
12670
- return value;
12670
+ return _this.pivotColumn ? value[_this.colField] : value;
12671
12671
  });
12672
12672
  this.listOptions = columnValues.map(mapToListItemWithFormatted);
12673
12673
  }
@@ -12764,7 +12764,9 @@ var DatoGridFilterComponent = /** @class */ (function () {
12764
12764
  filter.pivotKeys = this.pivotKeys;
12765
12765
  if (this.pivotColumn) {
12766
12766
  filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
12767
- fieldMap[field] = _this.pivotKeys[index];
12767
+ if (_this.pivotKeys[index]) {
12768
+ fieldMap[field] = _this.pivotKeys[index];
12769
+ }
12768
12770
  return fieldMap;
12769
12771
  }, {});
12770
12772
  }
@@ -14171,13 +14173,13 @@ var GridService = /** @class */ (function () {
14171
14173
  var e_2, _a;
14172
14174
  try {
14173
14175
  for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
14174
- var _b = filters_1_1.value, colId = _b.colId, filter = _b.filter;
14175
- var column = this.api.columns.getColumn(colId);
14176
+ var filter = filters_1_1.value.filter;
14177
+ var column = this.api.columns.getColumn(filter.colId);
14176
14178
  if (column) {
14177
14179
  this.setColumnFilter(column, filter);
14178
14180
  }
14179
14181
  else {
14180
- var pivotColumn = this.gridQuery.getSecondaryColumn(colId);
14182
+ var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
14181
14183
  this.setColumnFilter(pivotColumn, filter);
14182
14184
  }
14183
14185
  }