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

[DataGridPro] onRowsScrollEnd not firing on very fast scrolling #14171

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

arminmeh
Copy link
Contributor

@arminmeh arminmeh commented Aug 12, 2024

Fixes #14116

As written in the code comment
with fast scrolling, intersection observer may get connected to the target object, call the callback with the params that show that the intersection is not happening, but then fail to report that the intersection happen short after that (because it happened under single render cycle)

https://deploy-preview-14171--material-ui-x.netlify.app/x/react-data-grid/row-updates/

@arminmeh arminmeh added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Aug 12, 2024
@mui-bot
Copy link

mui-bot commented Aug 12, 2024

Deploy preview: https://deploy-preview-14171--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 9970762

@arminmeh arminmeh force-pushed the onRowsScrollEnd-not-firing branch 2 times, most recently from 1ac6ca7 to 5b78c68 Compare September 30, 2024 12:43
arminmeh and others added 5 commits September 30, 2024 15:38
Co-authored-by: Bilal Shafi <bilalshafidev@gmail.com>
Signed-off-by: Armin Mehinovic <4390250+arminmeh@users.noreply.github.com>
@arminmeh arminmeh force-pushed the onRowsScrollEnd-not-firing branch from 5b78c68 to 6758923 Compare September 30, 2024 13:38
Comment on lines +116 to +118
updateTargetTimeout.start(0, () => updateTarget(node));
},
[isEnabled],
[isEnabled, updateTargetTimeout],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL eslint-plugin-react-hooks is smart enough not to require updateTarget as a dependency here because it doesn't rely on any state that might change 🤯

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGridPro] Infinite loading onRowsScrollEnd intermittent issue not firing
5 participants