Skip to content
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] ArrowUp jumps #2178

Closed
2 tasks done
oliviertassinari opened this issue Jul 21, 2021 · 1 comment
Closed
2 tasks done

[DataGrid] ArrowUp jumps #2178

oliviertassinari opened this issue Jul 21, 2021 · 1 comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! waiting for 👍 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 21, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

focus.mp4

Jumps when using Arrow Left or Arrow Up.

Expected Behavior 🤔

No jumps when using Arrow Left or Arrow Up.

Steps to Reproduce 🕹

Steps:

  1. Open https://master--material-ui-x.netlify.app/components/data-grid/#commercial-version

Context 🔦

#2162

The .focus() call for the new active cell wrecks the correct scroll position that apiRef.current.scrollToIndexes() tries to set. You can also notice it in the other direction when using Arrow Up.

I didn't look into how to solve this. It might be a timing issue, the browser auto-scroll when focusing an element off-screen, so maybe we need to force a layout computation when we change the scroll, no idea. I will open a new GitHub issue, the current UX is not great.

For some reason Arrow Right and Arrow Down works without any issue.

Your Environment 🌎

v4.0.0-alpha.34 v4.0.0-alpha.33

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! waiting for 👍 Waiting for upvotes labels Jul 21, 2021
@m4theushw
Copy link
Member

This is working correctly in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

2 participants