Fixed misalignment when it's only one dimension

This commit is contained in:
Balazs Gobel
2019-02-08 13:08:52 +01:00
parent 68dccf8575
commit e3b7a7640e

View File

@@ -92,7 +92,8 @@ const DataCell = ({ data, general, measurement, styleBuilder, styling }) => {
}
let cellClass = 'grid-cells';
const shouldUseSmallCells = isColumnPercentageBased && data.headers.measurements.length > 1;
const hasTwoDimensions = data.headers.dimension2 && data.headers.dimension2.length > 0;
const shouldUseSmallCells = isColumnPercentageBased && data.headers.measurements.length > 1 && hasTwoDimensions;
if (shouldUseSmallCells) {
cellClass = 'grid-cells-small';
}