Skip to content

Nested-Grids: grid.save() and grid.load() behaviour  #2171

Closed

Description

@mbsouth

Subject of the issue

A grid is stored as an object using grid.save() for further use. If the same grid is reloaded with grid.load() and then saved again, the object grows recursively, even if no changes have been made to the grid.
This happens with nested grids and gets worse with nested-nested grids (subGridDynamic=true).

A working example is available here: https://dev4.wdns.at/

This example is based on the original Advanced Nested Grids demo, which has been extended by two textareas - nothing else.
The behavior I described can be understood by multiple save and load attempts and monitoring the content of the textareas.

Your environment

  • Version of Gridstack: v7.01, HTML5
  • Firefox v108, Chromium (ungoogled) v102

Steps to reproduce

Expected behavior

Even with multiple save and load processes, only changes to the grid may be applied

Activity

  1. adumesny commented on Jan 16, 2023

    @adumesny
    Member

    good find!

  2. added a commit that references this issue on Jan 16, 2023
    c1affaf
  3. adumesny commented on Jan 16, 2023

    @adumesny
    Member

    fixed in next release. don't forget to donate if you find this lib useful!

  4. mbsouth commented on Jan 17, 2023

    @mbsouth
    Author

    @adumesny
    Thanks for the quick bugfix.
    Unfortunately, the save/load behavior of nested-nested-grids has not improved.
    Attached an example that does not work (Gridstack demo/doc page):

    angrid-demo

  5. adumesny commented on Jan 17, 2023

    @adumesny
    Member

    not sure what you are pointing to (image doesn't tell me the issue). I already spent more time on this than I have...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions