-
-
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
[data grid] Grid automatically scrolls horizontally with pinned columns that exceed or take the half the viewport #14545
Comments
Hey @michelengelen ! Sorry to bug, but this issue is holding up some critical features for us and we're unable to build any workaround without forking the entire repo. Anything you can do to have someone take a look at this one would be appreciated. Thank you! |
Hey @louisaaron ... I did raise this in our team channel. |
Looks like it's a v7 regression – it worked as expected in v6: https://stackblitz.com/edit/react-z2nfxa-d6zknf |
Confirming that yes it was working fine in v6. We just caught this when upgrading to v7 @michelengelen @cherniavskii . Thank you both |
Hey @michelengelen . Just want to check and confirm that this is still being worked on since it's still a blocker for us. Thank you! |
Hi @louisaaron - I am currently working on this issue, hope to have a fix soon. I have a work-in-progress PR open, but there are more issues to work through than initially thought. |
Awesome thank you @KenanYusuf |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @louisaaron! How was your experience with our support team? |
Steps to reproduce
Demo: https://stackblitz.com/edit/react-z2nfxa?file=Demo.tsx
Current behavior
When we pin the columns so that they take up half of your screen (like 5/6 columns with respective widths), the Datagrid automatically scrolls horizontally in two scenarios
Scenario 1. Select an un-pinned cell and move the selection in any direction (top, bottom, right) using the up, down, right arrow keys
Scenario 2. Select an un-pinned cell and try to multi-select cells using either mouse drag or shift + arrow keys
Expected behavior
It shouldn't scroll horizontally and cell selection should behave as default.
Context
Findings: In Datagrid v7, the data grid is built such that the selected cell stays in the middle till we reach the extreme right, but with more pinned columns this logic automatically scrolls the whole grid horizontally and selected cell moves under pinned columns.
Code Snippet:
Your environment
System:
OS: macOS 14.2
Binaries:
Node: 20.14.0 - ~/.volta/tools/image/node/20.14.0/bin/node
npm: 10.7.0 - ~/.volta/tools/image/node/20.14.0/bin/npm
pnpm: Not Found
Browsers:
Chrome: 128.0.6613.120
Edge: Not Found
Safari: 17.2
npmPackages:
@emotion/react: ^11.13.3 => 11.13.3
@emotion/styled: ^11.13.0 => 11.13.0
@mui/base: 5.0.0-beta.40
@mui/core-downloads-tracker: 5.16.7
@mui/icons-material: ^5.16.7 => 5.16.7
@mui/lab: ^5.0.0-alpha.173 => 5.0.0-alpha.173
@mui/material: ^5.16.7 => 5.16.7
@mui/private-theming: 5.16.6
@mui/styled-engine: 5.16.6
@mui/system: 5.16.7
@mui/types: 7.2.16
@mui/utils: 5.16.6
@mui/x-data-grid: 7.14.0
@mui/x-data-grid-premium: ^7.13.0 => 7.14.0
@mui/x-data-grid-pro: 7.14.0
@mui/x-date-pickers: 7.14.0
@mui/x-date-pickers-pro: ^7.13.0 => 7.14.0
@mui/x-internals: 7.14.0
@mui/x-license: ^7.13.0 => 7.14.0
@mui/x-license-pro: ^6.10.2 => 6.10.2
@types/react: ^18.0.6 => 18.3.3
react: ^18.1.0 => 18.3.1
react-dom: ^18.1.0 => 18.3.1
styled-components: 5.3.11
typescript: ^5.1.6 => 5.5.2
Search keywords: Horizontal scroll with pinned columns
Order ID: 85118
The text was updated successfully, but these errors were encountered: