Skip to content

save() now takes optional column count #3134

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

Merged
merged 1 commit into from
Aug 11, 2025
Merged

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