You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/CHANGES.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Change log
5
5
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6
6
**Table of Contents***generated with [DocToc](http://doctoc.herokuapp.com/)*
7
7
8
-
-[9.1.1-dev (TBD)](#911-dev-tbd)
8
+
-[9.2.0 (2023-09-10)](#920-2023-09-10)
9
9
-[9.1.1 (2023-09-06)](#911-2023-09-06)
10
10
-[9.1.0 (2023-09-04)](#910-2023-09-04)
11
11
-[9.0.2 (2023-08-29)](#902-2023-08-29)
@@ -98,7 +98,8 @@ Change log
98
98
99
99
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
100
100
101
-
## 9.1.1-dev (TBD)
101
+
## 9.2.0 (2023-09-10)
102
+
* feat: nested grids now support `sizeToContent` to size themselves to how many sub items they contain - Thank you [@Helix](https://gridstackjs.slack.com/team/U05QT7G8H7T) for sponsoring this!
102
103
* fix [#2449](https://github.com/gridstack/gridstack.js/issues/2449) full grid maxRow fix
* Updates widget height to match the content height to avoid v-scrollbar or dead space.
1267
1268
* Note: this assumes only 1 child under resizeToContentParent='.grid-stack-item-content' (sized to gridItem minus padding) that is at the entire content size wanted.
1268
1269
* useAttrSize set to true if GridStackNode.h should be used instead of actual container height when we don't need to wait for animation to finish to get actual DOM heights
// NOTE: clientHeight & getBoundingClientRect() is undefined for text and other leaf nodes. use <div> container!
1287
-
if(!child){console.log(`Error: resizeToContent() '${GridStack.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return;}
1288
1286
constpadding=el.clientHeight-item.clientHeight;// full - available height to our child (minus border, padding...)
1289
1287
constitemH=useAttrSize&&n.h ? n.h*cell-padding : item.clientHeight;// calculated to what cellHeight is or will become (rather than actual to prevent waiting for animation to finish)
// NOTE: clientHeight & getBoundingClientRect() is undefined for text and other leaf nodes. use <div> container!
1294
+
constchild=item.firstElementChild;
1295
+
if(!child){console.log(`Error: resizeToContent() '${GridStack.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return;}
/** the type of engine to create (so you can subclass) default to GridStackEngine */
163
163
engineClass?: typeofGridStackEngine;
164
164
165
-
/** set to true if all grid items (by default, but item can also override) height should be based on content size instead of WidgetItem.h to avoid v-scrollbars.
166
-
Note: this is still row based, not pixels, so it will use ceil(getBoundingClientRect().height / getCellHeight()) */
167
-
sizeToContent?: boolean;
168
-
169
165
/** enable floating widgets (default?: false) See example (http://gridstack.github.io/gridstack.js/demo/float.html) */
/** set to true if all grid items (by default, but item can also override) height should be based on content size instead of WidgetItem.h to avoid v-scrollbars.
245
+
Note: this is still row based, not pixels, so it will use ceil(getBoundingClientRect().height / getCellHeight()) */
246
+
sizeToContent?: boolean;
247
+
248
248
/**
249
249
* makes grid static (default?: false). If `true` widgets are not movable/resizable.
250
250
* You don't even need draggable/resizable. A CSS class
0 commit comments