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] Fix bug in suspense #12553

Merged
merged 2 commits into from Mar 25, 2024
Merged

Conversation

romgrk
Copy link
Contributor

@romgrk romgrk commented Mar 25, 2024

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

mui-bot commented Mar 25, 2024

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

Generated by 🚫 dangerJS against da293be

@romgrk romgrk merged commit 6551530 into mui:master Mar 25, 2024
17 checks passed
@romgrk romgrk deleted the fix-grid-suspense-bug branch March 25, 2024 14:45
@scamden
Copy link

scamden commented Apr 10, 2024

will this fix only apply to v7 or will you be backporting to v6?

(we have run into the issue this seems to fix and a few other suspense bugs with DataGrid and I'm wondering whether v7 would have more fixes for Suspense in general, but the migration is time consuming)

@cherniavskii
Copy link
Member

@scamden This fix was not backported to v6.

a few other suspense bugs with DataGrid

Can you open a new issue with a reproduction example?
I can cherry-pick some fixes to v6 if necessary.

@scamden
Copy link

scamden commented Apr 11, 2024

this was the other big one that causes a few different symptom issues: #6879 (comment)

The apiRef becomes null during suspense which then can throw if MUI calls certain callbacks or events during that time. I mentioned one in the comment, but i think high level the root cause is nulling the ref out during suspense (which MUI throws a warning about even when there's no error). UPDATE: got a repro for you finally: #6879 (comment)

I can cherry-pick some fixes to v6 if necessary.

Thank you! This particular fix would be great.

The apiRef being null issue doesn't seem to have a fix yet and was dismissed as just a warning, but it does in fact cause errors (we have null checking throughout our code now to tell TS the ref can be null, which works for our code but seems silly)

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.

[data grid] Cannot set properties of null (setting 'scrollLeft')
4 participants