-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Is there an easy way to auto resize a gridItem based on the contents inside? #11
Comments
I was having the exact same question in a dashboard I built using grid-layout. |
news? |
Yup, this feature would be great |
I've implemented this feature, but it is not perfect. At first, set 'height : auto!height' in css, the browser will resize the griditem to fit the contents, then we get the acutal height using element.offsetHeight, finally recreate style and layout all items again. In GridLayout:
In GridItem:
CSS:
|
Ex: a gridItem has contents inside that take 300px in height, i wanted the gridItem to resize itself to 300px while the resize feature wouldn't let me resize the gridItem bellow 300px as well.
The text was updated successfully, but these errors were encountered: