-
-
Notifications
You must be signed in to change notification settings - Fork 51
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:
|
i have the same issues! any more solutions? |
I created a pull request and forked it into a temporary branch, also providing a tag to address the situation before the pull request is merged. check this exp file https://github.com/Tzyito/grid-layout-plus/blob/patch%40auto-resize-layout-v0.0.4/docs/demos/auto-height-layout.vue, hope it can help you solve the problem🫡 |
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: