@datorama/core 22.10.9-rc.3 → 22.10.9-rc.4

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.
@@ -14137,21 +14137,32 @@ var GridService = /** @class */ (function () {
14137
14137
  this.initPivotSecondaryColsProcess(params);
14138
14138
  params.gridOptions.enableV2_1 = true;
14139
14139
  params.gridOptions.saveSettings = false;
14140
- params.gridOptions.ensureDomOrder = true;
14141
- params.gridOptions.suppressColumnVirtualisation = true;
14142
14140
  params.gridOptions.defaultColDef.cellClass = this.getPivotCellClass.bind(this);
14143
14141
  params.gridOptions.autoGroupColumnDef.cellClass = this.getPivotCellClass.bind(this);
14144
14142
  }
14145
14143
  return params.gridOptions;
14146
14144
  };
14147
14145
  GridService.prototype.getPivotCellClass = function (params) {
14148
- var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex;
14149
- var cellClass = '';
14150
- if (leafGroup) {
14151
- var isEven = childIndex % 2 === 0;
14152
- cellClass += 'leaf-cell';
14153
- if (isEven) {
14154
- cellClass += ' even';
14146
+ var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
14147
+ var gridQuery = params.colDef.headerComponentParams.gridQuery;
14148
+ var cellClass = "";
14149
+ if (gridQuery) {
14150
+ var columns = gridQuery.api.columns;
14151
+ var allDisplayedColumns = columns.getAllDisplayedColumns();
14152
+ var col = allDisplayedColumns.find(function (column) {
14153
+ return column.getColId() === params.colDef.colId;
14154
+ });
14155
+ var colIndex = allDisplayedColumns.indexOf(col);
14156
+ if (rowGroupIndex <= colIndex) {
14157
+ if (leafGroup) {
14158
+ if (childIndex % 2 === 0) {
14159
+ /** If row is even */
14160
+ cellClass += ' primary-100-background-color';
14161
+ }
14162
+ }
14163
+ else {
14164
+ cellClass += 'primary-0-background-color pointer dato-simple-bold';
14165
+ }
14155
14166
  }
14156
14167
  }
14157
14168
  return cellClass;