Skip to content

Commit 564b769

Browse files
authored
Merge pull request #3030 from adumesny/master
`resizeToContentCheck()` wasn't blocking _ignoreLayoutsNodeChange
2 parents de69b34 + 8ded0de commit 564b769

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Change log
130130
* rem [#3027](https://github.com/gridstack/gridstack.js/pull/3027) remove legacy code support for disableOneColumnMode, oneColumnSize, oneColumnModeDomSort
131131
* fix [#3028](https://github.com/gridstack/gridstack.js/pull/3028) `updateOptions()` no longer modifies passed in struct. only field we check are being handled too.
132132
* fix [#3029](https://github.com/gridstack/gridstack.js/pull/3029) `resizeToContent()` fix for nested grid with content above
133+
* fix [#3030](https://github.com/gridstack/gridstack.js/pull/3030) `resizeToContentCheck()` wasn't blocking _ignoreLayoutsNodeChange at end of the loop
133134

134135
## 12.0.0 (2025-04-12)
135136
* feat: [#2854](https://github.com/gridstack/gridstack.js/pull/2854) Removed dynamic stylesheet and migrated to CSS vars. Thank you [lmartorella](https://github.com/lmartorella)

src/gridstack.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,9 @@ export class GridStack {
17971797
nodes.forEach(n => {
17981798
if (Utils.shouldSizeToContent(n)) this.resizeToContentCBCheck(n.el);
17991799
});
1800+
this._ignoreLayoutsNodeChange = true; // loop through each node will set/reset around each move, so set it here again
18001801
this.batchUpdate(false);
1802+
this._ignoreLayoutsNodeChange = false;
18011803
}
18021804
// call this regardless of shouldSizeToContent because widget might need to stretch to take available space after a resize
18031805
if (this._gsEventHandler['resizecontent']) this._gsEventHandler['resizecontent'](null, n ? [n] : this.engine.nodes);

0 commit comments

Comments
 (0)