Open annawatson-wk opened 3 days ago
Hey @annawatson-wk ... I can confirm this bug and it indeed seems like the virtualization is at fault here. The scrolling position is correct, however the scrollbar will jump back to a previous position once you stop scrolling. This can be easily reproduced by quickly scrolling and keeping the scrollbar clicked when stopping the scroll movement.
https://github.com/user-attachments/assets/acfbdc3d-0e5d-4c04-bd71-63d2ac3332c6
cc @romgrk
I just went back to change autoHeight
to getRowHeight
and didn't catch that you already did that. Thank you!
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-sux3md?file=Demo.tsx
Steps:
Current behavior
The row you're viewing when you release the scrollbar aren't the rows you see when you release the scrollbar. We don't see this behavior for a smaller number of rows where virtualization of rows doesn't come into play.
Expected behavior
The row you're viewing when you release the scrollbar are the rows you see when you release the scrollbar.
Context
We had a customer report this jumping behavior when they scroll using the scrollbar. The seems like this might be related to virtualization on the grid rows then those rows adjusting their size due to rowHeight auto. This was seen in version 6 and version 7 of mui-x. We're really looking for a way that we can make this virtualization/rowHeight behavior seem less clunky.
Your environment
``` System: OS: macOS 13.6.2 Binaries: Node: 20.8.1 - ~/.asdf/installs/nodejs/20.8.1/bin/node npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm Browsers: Chrome: 129.0.6668.71 ```npx @mui/envinfo
Search keywords: scrollbar data grid jumping pro premium rowHeight Order ID: 82849