Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bugs] Add a new widget in one column mode will affect the layouts after you switch back to multiple columns. #2559

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

Closed
yesterdaytime opened this issue Dec 6, 2023 · 3 comments · Fixed by #2646

Comments

@yesterdaytime
Copy link

yesterdaytime commented Dec 6, 2023

Subject of the issue

When I try to add a new widget in one column, it will reset all the nodes in one modal and doesn't change back them the correct position in multiple columns mode.

Steps to reproduce

  1. start the gridstack.js angular example, and select component ngFor example.
  2. Add 3 widgets.
  3. Change the chrome width and make the widget show in one column.
  4. Add a widget and change the chrome width to back multiple columns mode.

Expected behavior

The 3 widgets should be at the top.

Actual behavior

The 3 widgets at the left.

@adumesny
Copy link
Member

adumesny commented Dec 6, 2023

depends on where you add that 4th widget in 1 column. post a video or picture of what you are doing...

@yesterdaytime
Copy link
Author

The first time, item 1, item 2, and item 20 at the top, I wanted to keep them at the top after I added a new one in the one column mode, but they changed to the left. I need to change them to the top again. I think the new widget position only affects item 20, it doesn't affect item 1 and item 2.

add.new.widget.in.ngFor.mov

@adumesny
Copy link
Member

I changed the demo to append new item at the end rather than specific location which is hard to predict when doing in 1 column vs 12 anyway.
don't forget to donate if you find this lib useful!

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

Successfully merging a pull request may close this issue.

2 participants