diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 338420547..abb6ec1a5 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,6 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +- [7.0.1 (2022-10-14)](#701-2022-10-14) - [7.0.0 (2022-10-09)](#700-2022-10-09) - [6.0.3 (2022-10-08)](#603-2022-10-08) - [6.0.2 (2022-09-23)](#602-2022-09-23) @@ -73,6 +74,10 @@ Change log +## 7.0.1 (2022-10-14) +* fixed [#2073](https://github.com/gridstack/gridstack.js/issues/2073) SSR (server side rendering) isTouch issue (introduced in v6) +* fixed - removing last item delete sub-grid that are not auto-generated (nested.html vs nested_advanced.html) + ## 7.0.0 (2022-10-09) * add [#1009](https://github.com/gridstack/gridstack.js/issues/1009) Create sub-grids on the fly, by dragging items completely over others (nest) vs partially (push) using new flag `GridStackOptions.subGridDynamic=true`. diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index 6d6776f9c..373bab8e8 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -337,8 +337,8 @@ GridStack.prototype._setupAcceptWidget = function(this: GridStack): GridStack { let oGrid = origNode.grid; oGrid.engine.removedNodes.push(origNode); oGrid._triggerRemoveEvent(); - // if it's an empty sub-grid, nuke it - if (oGrid.parentGridItem && !oGrid.engine.nodes.length) { + // if it's an empty sub-grid, to get auto-created, nuke it + if (oGrid.parentGridItem && !oGrid.engine.nodes.length && oGrid.opts.subGridDynamic) { oGrid.removeAsSubGrid(); } }