From 7581c12a33f25e884ed41070f7bab9c292f40060 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Fri, 10 Nov 2023 15:59:48 +0100 Subject: [PATCH] fix: override cell size when using cumulative values This is to accommodate the accumulated value which might need a wider cell. The cell size is computed based on the rendered value. --- src/modules/pivotTable/PivotTableEngine.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/pivotTable/PivotTableEngine.js b/src/modules/pivotTable/PivotTableEngine.js index 20305f671..0640aeed4 100644 --- a/src/modules/pivotTable/PivotTableEngine.js +++ b/src/modules/pivotTable/PivotTableEngine.js @@ -1017,6 +1017,13 @@ export class PivotTableEngine { ) this.accumulators.rows[row][column] = renderedValue + + // override cell sizes based on their new content + // this works for non empty cells where the new value can require a wider cell + this.adaptiveClippingController.add( + { row, column }, + renderedValue + ) } return acc