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

Nested grids for v2 are not behaving the same as in v1 #43707

Closed
1 task done
frekvent-szabolcs opened this issue Sep 11, 2024 · 2 comments · Fixed by #43733
Closed
1 task done

Nested grids for v2 are not behaving the same as in v1 #43707

frekvent-szabolcs opened this issue Sep 11, 2024 · 2 comments · Fixed by #43733
Assignees
Labels
bug 🐛 Something doesn't work component: Grid The React component.

Comments

@frekvent-szabolcs
Copy link

frekvent-szabolcs commented Sep 11, 2024

Search keywords

grid

Latest version

  • I have tested the latest version

Steps to reproduce

Link to live example.

Current behavior

Nesting a Grid container inside a Grid (item) previously (using v1) worked like v2 works when I wrap the nested Grid container in a fragment. Is this broken or expected behaviour?

image

Also, when I nest a Grid container inside a Grid item, lot of times (even in my example), the CSS variables are not defined:
image

Expected behavior

No response

Context

After migrating to v6 from v5, following the Guide I migrated Grid v1 to v2. Many of my grids broke. I either had to specify widths for the inner Grids or just add fragments between the parent end children grids.

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
@frekvent-szabolcs frekvent-szabolcs added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 11, 2024
@oliviertassinari oliviertassinari added the component: Grid The React component. label Sep 11, 2024
@DiegoAndai DiegoAndai assigned DiegoAndai and unassigned siriwatknp Sep 11, 2024
@DiegoAndai DiegoAndai moved this to Backlog in Material UI Sep 11, 2024
@Janpot Janpot assigned Janpot and unassigned DiegoAndai Sep 12, 2024
@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 13, 2024
@ZeeshanTamboli ZeeshanTamboli moved this from Backlog to In progress in Material UI Sep 13, 2024
@Janpot
Copy link
Member

Janpot commented Sep 13, 2024

#43733 fixes this problem. See updated codesandbox.

Note that the behavior where nested grids inherit properties from the parent grid requires them to be direct children of the parent grid.

@github-project-automation github-project-automation bot moved this from In progress to Done in Material UI Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @frekvent-szabolcs! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

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: Grid The React component.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants