Skip to content

[CRUD] Stop CRUD List DataGrid from rendering with SSR#4907

Merged
apedroferreira merged 3 commits intomui:masterfrom
apedroferreira:crud-list-no-grid-ssr
Apr 30, 2025
Merged

[CRUD] Stop CRUD List DataGrid from rendering with SSR#4907
apedroferreira merged 3 commits intomui:masterfrom
apedroferreira:crud-list-no-grid-ssr

Conversation

@apedroferreira
Copy link
Collaborator

DataGrid was showing console errors during SSR in Next.js as it does not support it.

Took solution from mui/mui-x#17077

Closes #4906

@apedroferreira apedroferreira added type: bug It doesn't behave as expected. scope: toolpad-core Abbreviated to "core" component: crud labels Apr 29, 2025
@apedroferreira apedroferreira self-assigned this Apr 29, 2025
@apedroferreira apedroferreira changed the title Don't try rendering CRUD List DataGrid with SSR Don't render CRUD List DataGrid with SSR Apr 29, 2025
@apedroferreira apedroferreira changed the title Don't render CRUD List DataGrid with SSR [CRUD] Don't render CRUD List DataGrid with SSR Apr 29, 2025
@apedroferreira apedroferreira changed the title [CRUD] Don't render CRUD List DataGrid with SSR [CRUD] Stop CRUD List DataGrid from rendering with SSR Apr 29, 2025
@mui-bot
Copy link

mui-bot commented Apr 29, 2025

Netlify deploy preview

https://deploy-preview-4907--mui-toolpad-docs.netlify.app/

Generated by 🚫 dangerJS against a2e0486

@apedroferreira apedroferreira requested a review from a team April 29, 2025 11:14
import * as React from 'react';
import PropTypes from 'prop-types';
import { styled } from '@mui/material';
import { NoSsr, styled } from '@mui/material';
Copy link
Member

Choose a reason for hiding this comment

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

We have a better version of NoSsr in toolpad studio.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cool, added in a2e0486

@apedroferreira apedroferreira requested a review from Janpot April 29, 2025 16:14
@apedroferreira apedroferreira merged commit 77dc680 into mui:master Apr 30, 2025
15 checks passed
@apedroferreira apedroferreira deleted the crud-list-no-grid-ssr branch April 30, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: toolpad-core Abbreviated to "core" type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolbad CRUD Datagrid: Can't perform a React state update on a component that hasn't mounted yet

4 participants