-
-
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
[GridList] responsive cols and rows #6261
Comments
I think it is ok like that. You have the option to pass your own values. This is exactly what I do, I pass the |
Interesting. I'm quite new to React, but I assumed that gridList under the hood just applies css classes to some divs so wouldn't it be more performant to simply have some media queries on the gridList styles for the breakpoints rather than watching and debouncing window.innerWidth as well as completely re-rendering the component when window.innerWidth changes? I suppose in production, window.innerWidth doesn't really change that often and there is always the React-dimensions library to get the values easily but it just seems like maybe we're asking javascript to do a whole lot of work that css could do better and with fewer resources. Though I'm not a performance expert so please correct me if I'm wrong. |
Wish we could use something like the responsive syntax on the Box
|
Any chance to re-open this issue? I'd like the simplicity how |
@oliviertassinari thanks for your input. I am overwriting the width through custom css based on props. It works but I think an API @chrislim proposed would be great. |
this is still not possible? is there a workaround? |
my workaround...
Its ugly but it's the only one solution I found |
This would be very helpful! |
@oliviertassinari any chance of re-open this issue? responsive |
cols={{ xs: 2, sm: 3, md: 3, lg: 6 }} |
Yeah, it works, But why not work this way? <ImageList cols={{ xs: 2, sm: 3, md: 3}} > |
Description
I'm using this project after completing 2-3 projects with Angular Material. There is quite a bit of overlap in how the components and their options work. Sadly though one feature I really miss from Angular Material is the ability to set different cols and rows on different device widths.
Not sure how much work it is but it would be really great if we could have the GridList able to be 2 columns wide on mobile and 4 columns on tablet etc.
The props for GridList could become something like
This would be really useful for responsive applications. Thanks for considering this feature.
Images & references
https://material.angularjs.org/latest/demo/gridList
The text was updated successfully, but these errors were encountered: