Skip to content

Commit 8f0acb5

Browse files
committed
WiP distribution chart index fix
1 parent cdef0e5 commit 8f0acb5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/componentMapper.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export default function ComponentMapper({
184184
: Object.keys(realData[0]).map(
185185
(
186186
columnName: string,
187-
index: number
187+
columnIndex: number
188188
) => {
189189
const realDataColumn =
190190
realData.map(
@@ -205,7 +205,9 @@ export default function ComponentMapper({
205205
) => row[columnName]
206206
);
207207
return (
208-
<ErrorBoundary key={index}>
208+
<ErrorBoundary
209+
key={columnIndex}
210+
>
209211
<DistributionBarChart
210212
realData={
211213
realDataColumn
@@ -252,7 +254,10 @@ export default function ComponentMapper({
252254
data: syntheticData,
253255
} = createHeatmapdata(resultItem.synthetic);
254256
return (
255-
<div className="grid lg:grid-cols-[50%_50%] grid-cols-[100%]">
257+
<div
258+
key={`heatmap-${index}`}
259+
className="grid lg:grid-cols-[50%_50%] grid-cols-[100%]"
260+
>
256261
<div className="col-[1]">
257262
<h2 className="pb-2">
258263
{t('heatmap.realdata')}

0 commit comments

Comments
 (0)