Closed rory-orennia closed 4 months ago
Seems to be caused by this function: https://github.com/gridstack/gridstack.js/blob/9b6c68fc04bbb711eb93cdd427a334231e537353/src/dd-resizable.ts#L287
+1
Was just evaluating gridstack and testing it's responsive handling and ran into this.
fixed in next release. don't forget to donate if you find this lib useful!
Anytime I specify column in init options or via javascript after load all my items widths shrink to 0.
similarly with most other "responsive" columnOpts.
I am using bootstrap "container-fluid" on the parent of the grid-stack div, but I think something about the responsiveness is fundamentally broken.
something about the responsiveness is fundamentally broken.
@gazhay well that doesn't help without a demo showing the issue. also often people forget to include the correct CSS for other than 12 column layouts (extra.css)
Can't seem to find an extra.css in the npm dist
dd-base-impl.d.ts dd-droppable.js.map dd-manager.js dd-touch.d.ts gridstack-engine.js utils.d.ts
dd-base-impl.js dd-element.d.ts dd-manager.js.map dd-touch.js gridstack-engine.js.map utils.js
dd-base-impl.js.map dd-element.js dd-resizable.d.ts dd-touch.js.map gridstack.js utils.js.map
dd-draggable.d.ts dd-element.js.map dd-resizable-handle.d.ts gridstack-all.js gridstack.js.map
dd-draggable.js dd-gridstack.d.ts dd-resizable-handle.js gridstack-all.js.LICENSE.txt gridstack-poly.js
dd-draggable.js.map dd-gridstack.js dd-resizable-handle.js.map gridstack-all.js.map types.d.ts
dd-droppable.d.ts dd-gridstack.js.map dd-resizable.js gridstack.d.ts types.js
dd-droppable.js dd-manager.d.ts dd-resizable.js.map gridstack-engine.d.ts types.js.map
I am also aware I wasn't helpful for not posting a demo, but I literally was just putting together code from the docs and examples - nothing extra at all - pun intended.
I'll see if I can scrape extra.css from an example or something.
from 10.3 gzip
Subject of the issue
If you setup responsive column breakpoints and also set the
minW
on a widget, and resize the window/grid down to something smaller than that minW, it will render incorrectly on resize and seems to just grab theminW * currentColWidth
resulting in this:Your environment
Steps to reproduce
https://jsfiddle.net/qjb3faLk/1/
Expected behavior
The resize display should be the size of the widget, even if that widget is currently smaller than the
minW