question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ImageList] Layout breaks on large width with `variant="masonry"`

See original GitHub issue

Duplicates

  • 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: Screenshot 2021-12-28 at 12 44 33

Once I stretch the screen wide enough (not sure what exactly triggers it), the layout gets all random and broken: Screenshot 2021-12-28 at 12 44 27

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:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mnajdovacommented, Jan 3, 2022

Credits go to @hbjORbj for implementing the Masonry component 😃

1reaction
asjustiscommented, Dec 28, 2021

@mnajdova makes sense. Masonry seems to be working nicer. Thanks for a quick turnaround!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found