@dhis2/analytics 20.4.9 → 20.4.10

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [20.4.10](https://github.com/dhis2/analytics/compare/v20.4.9...v20.4.10) (2021-09-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix fixed row header with more than 2 cells DHIS2-11835 ([#1053](https://github.com/dhis2/analytics/issues/1053)) ([d0771d9](https://github.com/dhis2/analytics/commit/d0771d9187ea2e1c14ac6e2d2b083eb737e77f52))
7
+
1
8
  ## [20.4.9](https://github.com/dhis2/analytics/compare/v20.4.8...v20.4.9) (2021-09-21)
2
9
 
3
10
 
@@ -43,7 +43,8 @@ const PivotTableRowHeaderCell = ({
43
43
  style: {
44
44
  width,
45
45
  height,
46
- left: rowLevel > 0 ? engine.adaptiveClippingController.columns.headerSizes[rowLevel - 1] : 0
46
+ left: rowLevel > 0 ? // calculate the width of all row header cells on the left of current cell
47
+ engine.adaptiveClippingController.columns.headerSizes.slice(0, rowLevel).reduce((width, acc) => acc += width, 0) : 0
47
48
  },
48
49
  dataTest: "visualization-row-header"
49
50
  }, header.label)
@@ -29,7 +29,8 @@ export const PivotTableRowHeaderCell = ({
29
29
  style: {
30
30
  width,
31
31
  height,
32
- left: rowLevel > 0 ? engine.adaptiveClippingController.columns.headerSizes[rowLevel - 1] : 0
32
+ left: rowLevel > 0 ? // calculate the width of all row header cells on the left of current cell
33
+ engine.adaptiveClippingController.columns.headerSizes.slice(0, rowLevel).reduce((width, acc) => acc += width, 0) : 0
33
34
  },
34
35
  dataTest: "visualization-row-header"
35
36
  }, header.label)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "20.4.9",
3
+ "version": "20.4.10",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {