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

[Grid] Fix columns of nested container #31340

Merged
merged 4 commits into from
Mar 10, 2022

Conversation

boutahlilsoufiane
Copy link
Contributor

@boutahlilsoufiane boutahlilsoufiane commented Mar 6, 2022

Fix #30209.

This fixes the problem of giving a grid item within a nested grid container the wrong width. I think the source of the problem is the grid container inherits the columns of the root container and this happens only in the case when the prop columns value is 12. I tried to use the default columns value which’s 12.

@mui-bot
Copy link

mui-bot commented Mar 6, 2022

Details of bundle changes

Generated by 🚫 dangerJS against de0b443

@boutahlilsoufiane boutahlilsoufiane changed the title Fixing grid item width [Grid] Fixing nested container columns Mar 6, 2022
@boutahlilsoufiane boutahlilsoufiane changed the title [Grid] Fixing nested container columns [Grid] Fixing columns of nested container Mar 6, 2022
@danilo-leal danilo-leal changed the title [Grid] Fixing columns of nested container [Grid] Fix columns of nested container Mar 7, 2022
@danilo-leal danilo-leal added the component: Grid The React component. label Mar 7, 2022
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

Thanks for your work!
I added one more test and removed the wrapChild function as it's no longer relevant and I think it's ready to go.

@michaldudak michaldudak merged commit 82b6570 into mui:master Mar 10, 2022
@boutahlilsoufiane
Copy link
Contributor Author

Hi @michaldudak, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Grid The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Grid] Wrong grid item width for nested containers with custom columns prop
4 participants