[data grid] Prevent row-hover from updating when scrolling (fast) #15354
Labels
component: data grid
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
feature: Rendering layout
Related to the data grid Rendering engine
Summary
When scrolling fast, the hovered row never manages to catch up with the cursor position, hence it will often lag behind, and creates a distracting UX + makes the datagrid looks less performant (plus the browser has to do unnecessary paint updates). Hence I suggest preventing the browser from updating row hover when scrolling fast.
Browser do this kind of optimization by default, as you can witness from here: https://mui.com/material-ui/react-table/#column-grouping
Although, it can take a second to update when stopping scrolling. I'd propose something in between those two.
I made a simple POC (can probably be improved a lot): https://codesandbox.io/p/sandbox/zealous-bardeen-fhcws9?file=%2Fsrc%2FDemo.tsx%3A98%2C1
Toggle the setting on and off and see what you prefer when scrolling fast.
Examples
No response
Motivation
No response
Search keywords: scroll hover
The text was updated successfully, but these errors were encountered: