-
-
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
[Masonry] Items at the bottom of component fail to be rendered on Chrome #27934
Comments
Possible solutions:
|
Could it be an option to have a virtualized content so that when you scroll down only X need to be rendered? |
@Primajin Feel free to open a new issue for virtulization support with Masonry. |
#28586 👍🏻 |
@oliviertassinari @mnajdova @eps1lon The first usage of masonry component within the team is rejected #28485 (review) because of its known limitation, which is described in this issue:
I think this is a clear indication that we should consider switching to the other implementation, the flexbox approach, here: #28059. Its only downside compared to the current implementation is that it doesn't support column spanning. Still, I think that the lack of column spanning support is miniscule compared to the limitation of current masonry, which fails to render items beyond a certain threshold. If we decide to switch to the other implementation, I will modify the masonry blog post accordingly. |
Here is a good implementation |
Current Behavior 😯
Chrome limits the number of grid rows to 1000 at the maximum. Overflowing items beyond the 1000th row are simply squashed. A row size of 2px is used for
Masonry
component. Hence, the maximum height of the masonry is 2000px, and items that go beyond this height fail to be rendered correctly. It is worth noting that this limitation does not exist in Firefox or Safari.Expected Behavior 🤔
Masonry
should be able to render all items correctly on Chrome.Steps to Reproduce 🕹
https://codesandbox.io/s/imagemasonry-material-demo-forked-x4fyc?file=/demo.js
Steps:
columns
, to 3 (where masonry's height doesn't exceed 2000px). All items are rendered correctly.columns
, to 2 (which causes masonry's height to exceed 2000px). The items beyond the maximum height (hence at the bottom) fail to be rendered but rather are squashed.Context 🔦
The 2,000px height limit is insufficient for dashboards with charts, stats, tables, or images. With the current design (using a row gap of 2px), virtualisation is a good candidate to fix this issue, or there could be other smart workarounds.
Your Environment 🌎
Chrome browser
`npx @material-ui/envinfo`
``` Don't forget to mention which browser you used. Output from `npx @material-ui/envinfo` goes here. ```The text was updated successfully, but these errors were encountered: