-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
[feature] VGrid with autosize grid ceil width and height #281
Comments
Auto sizing grid will be nice. |
For example in react-virtuoso you can set styles for the container and it turns out that you can get the required markup using CSS. Works with minor problems, in particular sometimes a little more elements are drawn than expected, but overall not so critical: it seems like the dimensions of the first element are calculated and then the reference point goes to them: And my grid component looks like this:
|
Auto size for horizontal list too. Currently, we have to set the style , ex: |
Would it make sense to create a second grid component that makes a few assumptions:
Responsive cells could use container queries. A resize observer could be used to monitor the available width for the grid and set the column count based on it. And now that I am writing this I wonder if the VList component could be used to implement this. |
@szszoke |
I ended up doing more or less what is in the example you linked. I also used a resize observer on the container of the |
Is your feature request related to a problem? Please describe.
I'm using a grid in the following case:
All this is necessary for product cards to retain the card design pattern and fill the entire width of the container.
in general, the problem is to correctly process such a case for all screen with containers variations
Describe the solution you'd like
I would like to see a solution of the hoc type that will calculate the width and height of a grid cell and so that the grid can, based on these values, calculate the correct number of cells
Describe alternatives you've considered
Now I see the only solution is to prepare certain sizes. but in the same react-virtualzed there is a component that simplifies this flow.
Additional context
I understand that VGrid is still an experimental component, but if this could be corrected it would be very cool. We use your library in a large project because it covers almost all the necessary cases. Thanks for your work!
The text was updated successfully, but these errors were encountered: