bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.54k stars 779 forks source link

react-window slow rendering mui table rows #719

Open igortas opened 1 year ago

igortas commented 1 year ago

Hi, Setting react-window component as parent on top of <TableRow /> component from @mui, the rendering of the table makes so slooow.

<TableBody>
      <Grid
        rowCount={data.length}
        columnCount={2}
        itemData={data}
        columnWidth={50}
        rowHeight={50}
        height={1000}
        width={1000}
      >
        {({ data }) => {
          return (
            <>
              {data
                .map((row, index) => (
                  <TableRow
                    key={`row-${index}`}
                    row={row}
                    index={index}
                    onClick={onClick}
                  />
                ))}
            </>
          );
        }}
      </Grid>
    </TableBody>

BR,