-
-
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] Keyboard navigation doesn't work when active cell is out of the viewport #5750
Comments
Hi, @shelimov thanks for raising this! |
We need to keep the focused cell in the viewport. With virtualization enabled, it's removed as you scroll. I'm working on a POC to fix this and also #4744. For now, if you're using a small dataset, you can disable the virtualization with |
Keeping focused cell in DOM might not be enough. This also happens for us when the data changes so that the focused record is no longer in the data. For example if the page changes with pagination enabled. The grid is not accessible by keyboard at all when it happens, as there are no tab stops in it. This can easlily be reproduced in the pagination examples in your documentation. Focus a cell, change page, and try to focus the grid again with keyboard. |
Duplicates
Latest version
Current behavior 😯
Whenever I press any of the arrow keys, it applies scroll to the window.
https://codesandbox.io/s/1cm3xe?file=/demo.tsx
Screen.Recording.2022-08-10.at.17.22.26.mov
Expected behavior 🤔
DataGrid should select the next cell and scroll it into view.
The same way it works in ag-grid.
Screen.Recording.2022-08-10.at.17.27.51.mov
Steps to reproduce 🕹
No response
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: