Skip to content
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

RowHeight and Container Height "auto" or "%" #52

Open
ronaldux opened this issue Nov 3, 2021 · 3 comments
Open

RowHeight and Container Height "auto" or "%" #52

ronaldux opened this issue Nov 3, 2021 · 3 comments

Comments

@ronaldux
Copy link

ronaldux commented Nov 3, 2021

We need to make it responsive and now these properties are just in number, I need to set it to auto to calculate rowHeight and container height.

@gabrielew
Copy link

I had to do some calc to present the right amount of items per row;

const MAX_ITEM_WIDTH = 350 // your div
const ITEMS_PER_ROW = Math.ceil(window.innerWidth / MAX_ITEM_WIDTH) // boxesPerRow

@sarnason
Copy link

sarnason commented Sep 5, 2023

Fantastic. Works great. Just need to subscribe to the window resize event as well.
Would be great if the component had this automatically.

@igagandeep
Copy link

Hi, @ronaldux, did you find any solution that how to make the rowHeight to auto?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants