Skip to content

Conversation

adumesny
Copy link
Member

Description

  • fix "grid.save()" returns wrong grid representation (nested and changed column count) #2493
  • save() now takes optional column count, which defaults to highest saved layout otherwise (so we can correctly return back to 12 column when saving in lower res)
  • nested grid ALWAYS save to the saved parent container to match
  • also changed Utils.removeInternalForSave() to NOT removed w/h=1 optimization as it was causing issues in my app (widget defaults > 1)

Checklist

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

* fix gridstack#2493
* save() now takes optional column count, which defaults to highest saved layout otherwise (so we can correctly return back to 12 column when saving in lower res)
* nested grid ALWAYS save to the saved parent container to match
* also changed Utils.removeInternalForSave() to NOT removed w/h=1 optimization as it was causing issues in my app (widget defaults > 1)
@adumesny adumesny merged commit 7a51abd into gridstack:master Aug 11, 2025
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.

"grid.save()" returns wrong grid representation (nested and changed column count)
1 participant