Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Change log
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**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)
Expand Down Expand Up @@ -73,6 +74,10 @@ Change log

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

## 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`.
Expand Down
4 changes: 2 additions & 2 deletions src/dd-gridstack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down