You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application requires grids to be added and loaded dynamically.
Adding a single grid works fine, but loading two (or more) grids results in the second one working properly but the first one failing.
My method is as follows:
get a 'serialisation' array of grids and widgets (from indexeddb) to load grids and widgets
dynamically add each of the gridster divs and uls inside a container row. Attribute unique ids to each gridster div as the namespace
dynamically add the li widgets inside each grid ul. Each widget contains serialize params including the parent grid.
All works fine this far (a bit like recreating the 'grid-from-serialize.html' demo but with 2 grids and multiple widgets per grid.
Instantiate each grid where gridster[i] will be gridster[0] and second time round gridster[1] and where thisNamespace will be the unique gridster id in the parent div.
The second one works fine. In the first grid, the widgets are piled up on row 1 col 1 and won't move and the grid is not of the proportions defined. It's as though it hasn't been instantiated.
Here's the full code for instantiating the grids in a for loop:
Can anyone advise on what I might be doing wrong?
P.S. I've tried adding the widgets to each grid in a for loop after instantiating but hit the same wall.
Many thanks.
The text was updated successfully, but these errors were encountered:
My application requires grids to be added and loaded dynamically.
Adding a single grid works fine, but loading two (or more) grids results in the second one working properly but the first one failing.
My method is as follows:
All works fine this far (a bit like recreating the 'grid-from-serialize.html' demo but with 2 grids and multiple widgets per grid.
The second one works fine. In the first grid, the widgets are piled up on row 1 col 1 and won't move and the grid is not of the proportions defined. It's as though it hasn't been instantiated.
Here's the full code for instantiating the grids in a for loop:
Can anyone advise on what I might be doing wrong?
P.S. I've tried adding the widgets to each grid in a for loop after instantiating but hit the same wall.
Many thanks.
The text was updated successfully, but these errors were encountered: