Skip to content

Commit a2285e6

Browse files
committed
doc update
1 parent d791743 commit a2285e6

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

demo/nested.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ <h1>Nested grids demo</h1>
5454
let sub2 = [ {x:0, y:0, h:2}, {x:1, y:1, w:2}];
5555
let count = 0;
5656
[...sub1, ...sub2].forEach(d => d.content = String(count++));
57-
let subOptions = {
58-
// by default we inherit from parent, but you can override any sub-grid options here
59-
// column: 'auto', // DEFAULT size to match container. make sure to include gridstack-extra.min.css
60-
};
6157
let options = { // main grid options
6258
staticGrid, // test - force children to inherit too if we set to true above ^^^
6359
// disableDrag: true,
@@ -68,7 +64,7 @@ <h1>Nested grids demo</h1>
6864
acceptWidgets: true,
6965
id: 'main',
7066
resizable: { handles: 'se,e,s,sw,w'},
71-
subGridOpts: subOptions, // all sub grids will default to those
67+
// subGridOpts, // options for all subgrids, but defaults to column='auto' now so no need.
7268
children: [
7369
{x:0, y:0, content: 'regular item'},
7470
{x:1, y:0, w:4, h:4, sizeToContent: true, content: '<div>nested grid sizeToContent:true with some header content</div>', subGridOpts: {children: sub1, id:'sub1_grid', class: 'sub1'}},

src/gridstack.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ export class GridStack {
457457
* grid.addWidget({w: 3, content: 'hello'});
458458
*
459459
* @param w GridStackWidget definition. used MakeWidget(el) if you have dom element instead.
460-
* @param options widget position/size options (optional, and ignore if first param is already option) - see GridStackWidget
461460
*/
462461
public addWidget(w: GridStackWidget): GridItemHTMLElement {
463462
if (typeof w === 'string') { console.error('V11: GridStack.addWidget() does not support string anymore. see #2736'); return; }

0 commit comments

Comments
 (0)