Skip to content

Commit 0e92dea

Browse files
authored
Merge pull request #2079 from adumesny/master
prevent sub-grid auto removable when !subGridDynamic
2 parents 4ce29ba + 1df5ade commit 0e92dea

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/CHANGES.md

Lines changed: 5 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+
- [7.0.1 (2022-10-14)](#701-2022-10-14)
89
- [7.0.0 (2022-10-09)](#700-2022-10-09)
910
- [6.0.3 (2022-10-08)](#603-2022-10-08)
1011
- [6.0.2 (2022-09-23)](#602-2022-09-23)
@@ -73,6 +74,10 @@ Change log
7374

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

77+
## 7.0.1 (2022-10-14)
78+
* fixed [#2073](https://github.com/gridstack/gridstack.js/issues/2073) SSR (server side rendering) isTouch issue (introduced in v6)
79+
* fixed - removing last item delete sub-grid that are not auto-generated (nested.html vs nested_advanced.html)
80+
7681
## 7.0.0 (2022-10-09)
7782
* add [#1009](https://github.com/gridstack/gridstack.js/issues/1009) Create sub-grids on the fly,
7883
by dragging items completely over others (nest) vs partially (push) using new flag `GridStackOptions.subGridDynamic=true`.

src/dd-gridstack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ GridStack.prototype._setupAcceptWidget = function(this: GridStack): GridStack {
337337
let oGrid = origNode.grid;
338338
oGrid.engine.removedNodes.push(origNode);
339339
oGrid._triggerRemoveEvent();
340-
// if it's an empty sub-grid, nuke it
341-
if (oGrid.parentGridItem && !oGrid.engine.nodes.length) {
340+
// if it's an empty sub-grid, to get auto-created, nuke it
341+
if (oGrid.parentGridItem && !oGrid.engine.nodes.length && oGrid.opts.subGridDynamic) {
342342
oGrid.removeAsSubGrid();
343343
}
344344
}

0 commit comments

Comments
 (0)