Skip to content

Commit

Permalink
fix: pass valueType also for empty cells
Browse files Browse the repository at this point in the history
This is needed for the cumulative values feature, so empty cells can be
set to 0 or to the accumulated value.
  • Loading branch information
edoardo committed Nov 10, 2023
1 parent 668e13e commit 90bd18b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/pivotTable/PivotTableEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export class PivotTableEngine {
getRaw({ row, column }) {
const cellType = this.getRawCellType({ row, column })
const dxDimension = this.getRawCellDxDimension({ row, column })
const valueType = dxDimension?.valueType || VALUE_TYPE_TEXT

const headers = [
...this.getRawRowHeader(row),
Expand All @@ -353,6 +354,7 @@ export class PivotTableEngine {
return {
cellType,
empty: true,
valueType,
ouId,
peId,
}
Expand All @@ -365,7 +367,6 @@ export class PivotTableEngine {
? dataRow[this.dimensionLookup.dataHeaders.value]
: dataRow.value
let renderedValue = rawValue
const valueType = dxDimension?.valueType || VALUE_TYPE_TEXT

if (valueType === VALUE_TYPE_NUMBER) {
rawValue = parseValue(rawValue)
Expand Down

0 comments on commit 90bd18b

Please sign in to comment.