From 321e0acb7710b62fb8e36473dd886cd3487b7e96 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Fri, 10 Nov 2023 15:57:04 +0100 Subject: [PATCH] fix: pass dxDimension object also for empty cells Needed for the cumulative values feature. --- src/modules/pivotTable/PivotTableEngine.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/pivotTable/PivotTableEngine.js b/src/modules/pivotTable/PivotTableEngine.js index 1ac23d294..abef32923 100644 --- a/src/modules/pivotTable/PivotTableEngine.js +++ b/src/modules/pivotTable/PivotTableEngine.js @@ -520,10 +520,8 @@ export class PivotTableEngine { return undefined } const cellValue = this.data[row][column] - if (!cellValue) { - return undefined - } - if (!Array.isArray(cellValue)) { + + if (cellValue && !Array.isArray(cellValue)) { // This is a total cell return { valueType: cellValue.valueType, @@ -559,6 +557,11 @@ export class PivotTableEngine { } } + // Empty cell + // The cell still needs to get the valueType to render correctly 0 and cumulative values + // + // OR + // // Data is in Filter // TODO : This assumes the server ignores text types, we should confirm this is the case return {