[ImageList] Layout breaks on large width with `variant="masonry"`
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
I have implemented masonry to display elements nicely in a 5x2 size grid. Works nicely, just as I wanted:
Once I stretch the screen wide enough (not sure what exactly triggers it), the layout gets all random and broken:
I thought this was the breakpoints or something, but nop. I noticed this after already being in the XL default breakpoint range.
Expected behavior 🤔
The layout should stick to the initial 5 column layout regardless of the screen width.
Steps to reproduce 🕹
CodeSandbox link using the latest MUI version: https://codesandbox.io/s/bold-water-rvzyk?file=/src/App.js
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Using: Google Chrome
JustisMac:website asjustis$ npx @mui/envinfo
npx: installed 2 in 4.638s
System:
OS: macOS Mojave 10.14.6
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.11 - /usr/local/bin/npm
Browsers:
Chrome: 96.0.4664.110
Edge: Not Found
Firefox: 88.0.1
Safari: 14.1.2
npmPackages:
@emotion/react: ^11.6.0 => 11.6.0
@emotion/styled: ^11.6.0 => 11.6.0
@mui/core: 5.0.0-alpha.54
@mui/icons-material: ^5.2.5 => 5.2.5
@mui/material: ^5.1.0 => 5.1.0
@mui/private-theming: 5.1.0
@mui/styled-engine: 5.1.0
@mui/styles: ^5.2.3 => 5.2.3
@mui/system: 5.1.0
@mui/types: 7.1.0
@mui/utils: 5.1.0
@types/react: 17.0.35
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
[ImageList] Layout breaks on large width with `variant ... - GitHub
Current behavior. I have implemented masonry to display elements nicely in a 5x2 size grid. Works nicely, just as I wanted: Screenshot 2021- ......
Read more >React MUI, How to append to a Masonry Image List
I'm trying to use the React MUI Masonry Image List component with the infintie scroll component. They seem to work pretty great together....
Read more >Image List React component - Material UI - MUI
The Image List displays a collection of images in an organized grid. ... <ImageList variant="masonry" cols={3} gap={8}> {itemData.map((item) ...
Read more >CSS grid-template-rows property - W3Schools
The grid-template-rows property specifies the number (and the heights) of the rows in a grid layout. The values are a space-separated list, where...
Read more >Image lists - Material Design
The Masonry Image List variant presents images vertically arranged into ... to the viewport width, and images could become exceedingly large compared to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Credits go to @hbjORbj for implementing the Masonry component 😃
@mnajdova makes sense. Masonry seems to be working nicer. Thanks for a quick turnaround!