-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Blank space in the scroll container #414
Comments
I can observe the spacing that shouldn't be present, however, what do you mean by "jump" do you have a recording? |
Yes here it is. I sometimes encounter this but sometimes don't. And this should be related too. I check DevTools and noticed that the last row is not rendered sometimes. |
Is there a way to disable virtualization? Many users won't load more than 100 rows and virtualization seems overkill sometimes. |
I will be looking into this. Let's see what I can find. Some code paths and context to look into could help me. |
Hi @oliviertassinari I am also interested in disabling the virtualisation for small grids but with lots of UI elements. I am not entirely sure how it relates to #193 but would be eager to understand what is holding back the ability to set For reference this is what we see with the scroll event, if we have a monitor high enough to show all 100 rows (which is what we set our pagination to anyway) then the performance is fine, it's just the scrolling into the virtual rows that is causing this epic event. |
@royletron this sounds related to #270. I was advocating that the overscan logic is suboptimal. I suspect that for large screens, we render way too many rows outside of the viewport. I was advocating that the height of the virtualization screen shouldn't be a variable in the equation, the height of the row, on the other hand, should. Do you have a codesandbox with the display conditions so we can investigate? |
@oliviertassinari I'll have a go and get back to you. We are using a few custom renderers on our columns which allow for interaction so it seems mounting those from the buffer is expensive. |
@oliviertassinari check out https://codesandbox.io/s/mui-x-414-xlhsq Particularly scrolling to the bottom of the grid. |
@royletron Perfect. Note that We have little room to improve. The core components weren't designed to render smoothly with x100 instances x10 Hz. If it were the objective, we would have made significantly different choices. I would recommend:
As for making the core component render more smoothly. You are using v4, they are getting a bit slower in v5 because we move from JSS to emotion/styled-components. Nothing major when you have a few instances in a page, but definitely noticeable when you render x100 multiple times per second. For us, the choice was a no brainer, more flexibility with the core components largely yield more adoption than more performance. |
I believe we didn't solve this part of the issue. It can be seen it on https://master--material-ui-x.netlify.app/components/data-grid/demo/. |
The unnecessary blank space at the bottom pointed by #414 (comment) was fixed in #2673 and released in the latest beta. |
Current Behavior 😯
https://codesandbox.io/s/data-grid-bug-388qz
When scrolling to bottom, the rows "jumped" and unnecessary spacing appears at the bottom.
Expected Behavior 🤔
Scrolls normally to the bottom, with the last item sticking to the bottom.
Steps to Reproduce 🕹
See codesandbox
Steps:
Context 🔦
Your Environment 🌎
The text was updated successfully, but these errors were encountered: