Skip to content
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

Loading the layout based on ids does'nt render the layout as defined in the layout positioning. #1693

Closed
giannik opened this issue Mar 28, 2021 · 2 comments · Fixed by #1694

Comments

@giannik
Copy link

giannik commented Mar 28, 2021

I am trying to build a dashboard with widgets where inside the grid layout I am only storing Ids for the related widgets (not the content). Later When loading the page I prepopulate the html with the ids in the page.
At the end I bind the layout retreveived from the databased to the html .
But the layout is not rendered as stored in the database .
The x co-ordinates of the 2 widgets are different but not reflected in the layout

sample :
https://jsfiddle.net/f05b817u/

Expected behavior

Should render layout as described in json layout file.

Actual behavior

Generates radnom layout

slack discussion here :
https://gridstackjs.slack.com/archives/C0LPPLXJR/p1616872260059300
related issue #1683

adumesny added a commit to adumesny/gridstack.js that referenced this issue Mar 28, 2021
* fix gridstack#1693
* broke in 4.x. load() now correctly works again (batch mode saving initial values multiple times)
* added unit test and demo as well, so this shouldn't happen again.
@adumesny
Copy link
Member

adumesny commented Mar 28, 2021

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

next time, just update the original bug...easier to re-open instead.

@giannik
Copy link
Author

giannik commented Mar 28, 2021

ok, alain. will do next time.
small donation made.

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 a pull request may close this issue.

2 participants