We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c4cd8b commit 91feaacCopy full SHA for 91feaac
src/VirtualTable/VirtualRow.tsx
@@ -31,19 +31,18 @@ export default function VirtualRow({
31
scrollLeft,
32
);
33
34
- return showColumnIndexes
35
- .map(idx => flattenColumns[idx])
36
- .map((column, idx) => {
37
- const colIndex = showColumnIndexes[idx];
38
- return (
+ return showColumnIndexes.reduce(
+ (total, colIndex) =>
+ total.concat(
39
<VirtualCell
40
key={colIndex}
41
- column={column}
+ column={flattenColumns[colIndex]}
42
colIndex={colIndex}
43
style={startIndex === colIndex ? { marginLeft: virtualOffset } : {}}
44
cellProps={cellPropsCollections[colIndex]}
45
{...restProps}
46
- />
47
- );
48
- });
+ />,
+ ),
+ [],
+ );
49
}
0 commit comments