[Datagrid] RowIndexes are not stable, breaking memoization #10373
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
Current behavior 😯
When you scroll back up quickly, there's a whole bunch of rows that are forced to re-render, breaking memoization of them (essentially whatever hits the scrollable area gets reindex re-assigned on every single row being added back by virtulisation).
Caused by this PR: #7357
Expected behavior 🤔
RowIndexes should be kept intact regardless of whether the rows are kept in the DOM or not, the underlying data didn't change.
For inspiration, this is a good design for "sticky rows" virtualisation that doesn't manipulate indexes: https://tanstack.com/virtual/v3/docs/api/virtualizer#rangeextractor
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: