-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Grid2] size
and gap
should work when direction is column
or column-reverse
#43578
Comments
Thanks for the report, @RunRanger. The May I ask you to describe how you're trying to achieve more specifically? Could you provide a minimal reproduction? This would help a lot. A live example would be perfect. This StackBlitz sandbox template may be a good starting point. Thank you! |
Thank you for your response! Example with deprecated Grid and new Grid2. Both Grids should look the same but Grid2 can't handle height while direction is set to column: Direction prop doesn't work properly for "column". It's also mentioned in the doku. But since the normal Grid becoming deprecated there's no alternative to replace it with Grid2, because column-direction isn't supported. |
@RunRanger Can you explain the need for using Grid with direction column? In my opinion, the Grid should always be row (with its limitation). If you want to fill the items by row, please consider using CSS Grid with |
@siriwatknp Thank you for your response. It doesn't happen often, but as soon as I don't want a page to be scrollable (fixed height) or elements such as full-screen dialogues or similar, vertical grids are very useful. Since you can normally also set columns in CSS for grids, my expectation as a user would be that this is also available for the MUI component. Of course, you could also recreate this yourself with your own CSS. But for me the question arises as to why basic functionalities are restricted with a version upgrade. Also it would be better from a coding point of view if you didn't have to differentiate between row grids and vertical grids. |
I'd expect the |
@aarongarciah it could work, the |
column
directions should work with size
and gap
as well
column
directions should work with size
and gap
as wellsize
and gap
should work when direction is column
or column-reverse
How does a "Grid" component fail at providing a simple grid? |
Hey @ZacharyACoon, what are you trying to achieve? If you provide an explanation, we'll be happy to help you. |
Summary
Since V6 Grid became deprecated and Grid2 recommended.
Unfortunately it's not possible to convert from Grid to Grid2 since Grid2 doesn't support the direction property. So no column direction is allowed.
Goal:
Grid2 items can be also arranged in column direction.
Examples
Example with deprecated Grid and new Grid2. Both Grids should look the same but Grid2 can't handle height while direction is set to column:
https://stackblitz.com/edit/stackblitz-starters-6zeyer?file=src%2FApp.tsx
Motivation
Refactor Code from Grid to Grid2
Search keywords: Grid2 Grid direction column
The text was updated successfully, but these errors were encountered: