Skip to content

Commit c487581

Browse files
authored
Merge pull request #3086 from adumesny/master
call _updateContainerHeight() when changing opts.minRow
2 parents 6339147 + 8a66862 commit c487581

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

doc/CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8+
- [12.2.1-dev (TBD)](#1221-dev-tbd)
89
- [12.2.1 (2025-05-28)](#1221-2025-05-28)
910
- [12.2.0 (2025-05-27)](#1220-2025-05-27)
1011
- [12.1.2 (2024-05-07)](#1212-2024-05-07)
@@ -129,6 +130,11 @@ Change log
129130

130131
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
131132

133+
## 12.2.1-dev (TBD)
134+
* fix: [#3070](https://github.com/gridstack/gridstack.js/pull/3070) incorrect property name 'sizeToContent' when cleaning up invalid attributes
135+
* fix: [#3077](https://github.com/gridstack/gridstack.js/pull/3077) incorrect node._id check
136+
* fix: [#3085](https://github.com/gridstack/gridstack.js/issues/3085) `opts.minRow` being updated
137+
132138
## 12.2.1 (2025-05-28)
133139
* fix: [#3064](https://github.com/gridstack/gridstack.js/pull/3064) fix `GridStack.updateCB(w)` crash
134140

src/gridstack.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,9 +1301,11 @@ export class GridStack {
13011301
if (o.disableDrag !== undefined && !o.staticGrid) this.enableMove(!o.disableDrag);
13021302
if (o.disableResize !== undefined && !o.staticGrid) this.enableResize(!o.disableResize);
13031303
if (o.float !== undefined) this.float(o.float);
1304-
if (o.row !== undefined) { opts.minRow = opts.maxRow = opts.row = o.row; }
1305-
else {
1306-
if (o.minRow !== undefined) opts.minRow = o.minRow;
1304+
if (o.row !== undefined) {
1305+
opts.minRow = opts.maxRow = opts.row = o.row;
1306+
this._updateContainerHeight();
1307+
} else {
1308+
if (o.minRow !== undefined) { opts.minRow = o.minRow; this._updateContainerHeight(); }
13071309
if (o.maxRow !== undefined) opts.maxRow = o.maxRow;
13081310
}
13091311
if (o.children?.length) this.load(o.children);

0 commit comments

Comments
 (0)