gregnb / gregnb/mui-datatables
should render cell/row body only for rows in `displayData`?
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
Can MuiDatatable not render cells of rows that are not on the page being displayed? As far as I can tell searching/filtering happens only on the rowData, not on what's rendered (e.g. extra text in customBodyRender cannot be filtered upon or matched in text searches).
I'm trying to minimize severe performance (e.g. unresponsiveness) issues when a several dataRows are being added after MUIDataTable has rendered. If the UI was only rendering the page being displayed, that seems like it could help a lot!
## Expected Behavior
only render the cells that are being displayed in the current page
## Current Behavior
`customBodyRender` is getting called for all rows even for the ones that aren't on the displayed page.
## Steps to Reproduce (for bugs)
1. setup data with one or more than rows
2. set options.rowsPerPage = 0 (to hide all the rows)
3. configure a column that has `customBodyRender` and in there, add a console.log(`customBodyRender ${value}` ) to indicate the cell is getting rendered.
4. notice that console.log is getting called for all the rows.
## Your Environment
| Tech | Version |
|--------------|---------|
| Material-UI | 3.9.2 |
| MUI-datatables | 2.2.0 |
| React | 16.8.2 |
| browser | Chromium (Electron 4.1.3) |
| etc | |

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.