Skip to content

auto-size height to fit content - #2404

Merged
adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master
Aug 7, 2023
Merged

adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master

Conversation

@adumesny

@adumesny adumesny commented Aug 7, 2023

Copy link
Copy Markdown
Member

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