Skip to content

Commit

Permalink
Made the table cell keys more unique
Browse files Browse the repository at this point in the history
-This makes it possible to use the same measurement
 multiple times within the same smart-pivot chart.

Issue: DEB-232
  • Loading branch information
Albert Backenhof authored and Albert Backenhof committed May 13, 2019
1 parent 6d305b2 commit 1436463
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/data-table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const DataTable = ({ data, general, qlik, renderData, styling }) => {
}

const { dimension1: dimension1Info, dimension2, measurement } = measurementData.parents;
const id = `${dimension1Info.elementNumber}-${dimension2 && dimension2.elementNumber}-${measurement.header}`;
const id = `${dimension1Info.elementNumber}-${dimension2 && dimension2.elementNumber}-${measurement.header}-${measurement.index}`;
return (
<DataCell
data={data}
Expand Down
4 changes: 2 additions & 2 deletions src/headers-table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const HeadersTable = ({ data, general, qlik, styling, isKpi }) => {
baseCSS={baseCSS}
general={general}
hasSecondDimension={hasSecondDimension}
key={`${measurementEntry.displayValue}-${measurementEntry.name}`}
key={`${measurementEntry.displayValue}-${measurementEntry.name}-${measurementEntry.index}`}
measurement={measurementEntry}
styling={styling}
/>
Expand Down Expand Up @@ -104,7 +104,7 @@ const HeadersTable = ({ data, general, qlik, styling, isKpi }) => {
dimensionEntry={dimensionEntry}
general={general}
hasSecondDimension={hasSecondDimension}
key={`${measurementEntry.displayValue}-${measurementEntry.name}-${dimensionEntry.name}`}
key={`${measurementEntry.displayValue}-${measurementEntry.name}-${measurementEntry.index}-${dimensionEntry.name}`}
measurement={measurementEntry}
styling={styling}
/>
Expand Down

0 comments on commit 1436463

Please sign in to comment.