[DataGrid] ArrowUp jumps #2178
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
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:
Context 🔦
#2162
The
.focus()
call for the new active cell wrecks the correct scroll position thatapiRef.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.34v4.0.0-alpha.33The text was updated successfully, but these errors were encountered: