Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Grid] prevent off-page rendering #4217

Closed
PhaedrusTheGreek opened this issue Nov 3, 2020 · 3 comments
Closed

[Data Grid] prevent off-page rendering #4217

PhaedrusTheGreek opened this issue Nov 3, 2020 · 3 comments

Comments

@PhaedrusTheGreek
Copy link
Contributor

Given the CodeSandbox example for "Pagination only in-memory", if you put a console.log(rowIndex) in the renderer, you'll see that the entire dataset (all 100 rows) are rendered initially, even though the page size is 10.

@myasonik
Copy link
Contributor

myasonik commented Nov 3, 2020

I couldn't actually find an open ticket for it but this work is already in progress!

#4170

@chandlerprall
Copy link
Contributor

I couldn't actually find an open ticket for it but this work is already in progress!

Distinction between the virtualization & this reported off-page rendering. When setting the datagrid's inmemory prop to pagination or sorting, every cell will be rendered off screen. This enables the inmemory sorting to work, as rendering those cells & inspecting their values is the only way the grid can access the cell values. I don't remember why setting the inmemory level to pagination does the same, it doesn't seem like knowing those values would be required.

@chandlerprall
Copy link
Contributor

Looking/thinking through this more, it is working as intended. When in-memory level is pagination that means all of the data is available for in-memory rendering, and using that full data set to determine the column schema is more accurate than artificially limiting the rows used for detecting a schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants