gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.3k stars 1.26k forks source link

Widgets get the wrong width when resized in breakpoint mode #2718

Open rory-orennia opened 2 weeks ago

rory-orennia commented 2 weeks ago

Subject of the issue

If you resize a widget while in a smaller breakpoint, then save, then load that widget, it'll now have the wrong width.

Your environment

Steps to reproduce

https://jsfiddle.net/8uyv7k9o/4/

  1. click load
  2. resize widget 2
  3. click save
  4. click load
  5. item 2 resizes to the full width
  6. open the console and see that the w: 4(or more) on that widget when it started as w: 2 and was shrunk.

https://github.com/gridstack/gridstack.js/assets/93952948/38c432b2-7a37-410d-9eeb-2ce68993aa90

Expected behavior

The widget should be the same size after load as it was when it was saved. I was hoping https://github.com/gridstack/gridstack.js/issues/2669 would solve this but it did not.

adumesny commented 2 weeks ago

same underlying issue as #2493