-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[DataGrid] Add disableVirtualization
to disable virtualization completely
#2326
Conversation
5a9ad27
to
fe60f82
Compare
Thoughts
|
There's a bug in this PR. Filter and try to navigate with the keyboard, it doesn't work.
@oliviertassinari Yeah, I'll investigate if it's easier to use the native scroll instead. Basically, we need to remove the two divs between the window and the rendering zone.
Yes
I added a small section in https://deploy-preview-2326--material-ui-x.netlify.app/components/data-grid/virtualization/#disable-virtualization |
Great, should we explain why developers might want to disable it?
I meant for the future, not this PR 😁
|
|
||
{{"demo": "pages/components/data-grid/virtualization/VirtualizationApiNoSnap.js", "bg": "inline", "hideToolbar": true}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the changes is to move the scroll methods to a separated hook. Since this interface is empty now I removed it. Maybe we should add a page for scrolling with a demo: #1103 (comment). In this new page we could document the API available.
Preview https://deploy-preview-2326--material-ui-x.netlify.app/components/data-grid/virtualization/#disable-virtualization
Closes #1781
I created a separate hook to not mix concerns and to touch as little as possible the virtualization logic.
scrollToIndexes
andscroll
to a dedicated hook because they're not tied to the virtualizationuseGridNoVirtualization
hook to sync the state and handle the scroll when virtualization is offPreview: https://deploy-preview-2326--material-ui-x.netlify.app/storybook/?path=/story/x-grid-tests-rows--disable-virtualization&globals=measureEnabled:false