Compare commits
5 Commits
QLIK-98564
...
bugfix/QB-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2710d4629f | ||
|
|
8c093a4692 | ||
|
|
ec822b843b | ||
|
|
0d98553a71 | ||
|
|
6513a294b3 |
@@ -33,27 +33,34 @@ class DataTable extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderMeasurementData = (dimIndex, atEvery) => {
|
const renderMeasurementData = (dimIndex, atEvery) => {
|
||||||
const injectSeparatorsArray = injectSeparators(
|
|
||||||
matrix[dimIndex],
|
|
||||||
columnSeparatorWidth,
|
|
||||||
atEvery
|
|
||||||
);
|
|
||||||
|
|
||||||
if (dimension2.length <= 0) {
|
if (dimension2.length <= 0) {
|
||||||
return injectSeparatorsArray;
|
return injectSeparators(
|
||||||
|
matrix[dimIndex],
|
||||||
|
columnSeparatorWidth,
|
||||||
|
atEvery
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const measurementDataRow = [];
|
const measurementDataRow = [];
|
||||||
let index = 0,
|
let index = 0,
|
||||||
match;
|
match;
|
||||||
dimension2.forEach((dim2) => {
|
dimension2.forEach(dim2 => {
|
||||||
measurements.forEach((measure, mesInd) => {
|
measurements.forEach((measure, mesInd) => {
|
||||||
for (index = 0; index < injectSeparatorsArray.length; index++) {
|
for (index = 0; index < matrix[dimIndex].length; index++) {
|
||||||
match = false;
|
match = false;
|
||||||
if (injectSeparatorsArray[index].parents && dimension1[dimIndex].displayValue === injectSeparatorsArray[index].parents.dimension1.header) {
|
if (
|
||||||
if (dim2.displayValue === injectSeparatorsArray[index].parents.dimension2.header) {
|
matrix[dimIndex][index].parents &&
|
||||||
if (measure.name === injectSeparatorsArray[index].parents.measurement.header) {
|
dimension1[dimIndex].displayValue ===
|
||||||
measurementDataRow.push(injectSeparatorsArray[index]);
|
matrix[dimIndex][index].parents.dimension1.header
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
dim2.displayValue ===
|
||||||
|
matrix[dimIndex][index].parents.dimension2.header
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
measure.name ===
|
||||||
|
matrix[dimIndex][index].parents.measurement.header
|
||||||
|
) {
|
||||||
|
measurementDataRow.push(matrix[dimIndex][index]);
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -62,7 +69,7 @@ class DataTable extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
if (!match) {
|
if (!match) {
|
||||||
measurementDataRow.push({
|
measurementDataRow.push({
|
||||||
displayValue: '',
|
displayValue: "",
|
||||||
parents: {
|
parents: {
|
||||||
dimension1: {
|
dimension1: {
|
||||||
elementNumber: dimension1[dimIndex].elementNumber,
|
elementNumber: dimension1[dimIndex].elementNumber,
|
||||||
@@ -81,9 +88,14 @@ class DataTable extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return measurementDataRow;
|
return injectSeparators(
|
||||||
|
measurementDataRow,
|
||||||
|
columnSeparatorWidth,
|
||||||
|
atEvery
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="row-wrapper">
|
<div className="row-wrapper">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Root extends React.PureComponent {
|
|||||||
// Determine cell- and column separator width
|
// Determine cell- and column separator width
|
||||||
let cellWidth = '0px';
|
let cellWidth = '0px';
|
||||||
let columnSeparatorWidth = '';
|
let columnSeparatorWidth = '';
|
||||||
if (this.dataTableRef) {
|
if (this.dataTableRef && !error) {
|
||||||
const tableWidth = this.dataTableRef.getBoundingClientRect().width;
|
const tableWidth = this.dataTableRef.getBoundingClientRect().width;
|
||||||
this.renderedTableWidth = tableWidth;
|
this.renderedTableWidth = tableWidth;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user