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

auto-size height to fit content #2404

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

adumesny
Copy link
Member

@adumesny adumesny commented Aug 7, 2023

Description

  • fix make widget auto-size height to fit content (no vertical scrollbar) #404
  • added GridStackOptions.fitToContent and GridStackWidget.fitToContent to make gridItems size themselves to their content (no scroll bar), calling GridStack.resizeToContent(el) whenever the grid or item is resized
  • added demo showing behavior
  • fixed sizing event to use much more accurate ResizeObserver on grid rather than generic window.addEventListener('resize')

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

* fix gridstack#404
* added `GridStackOptions.fitToContent` and `GridStackWidget.fitToContent` to make gridItems size themselves to their content (no scroll bar), calling `GridStack.resizeToContent(el)` whenever the grid or item is resized
* added demo showing behavior
* fixed sizing event to use much more accurate ResizeObserver on grid rather than generic window.addEventListener('resize')
@adumesny adumesny merged commit 059054b into gridstack:master Aug 7, 2023
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

Successfully merging this pull request may close these issues.

make widget auto-size height to fit content (no vertical scrollbar)
1 participant