From a2285e60668d20183a2f4ec3918a4a22f917c2fd Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Mon, 16 Dec 2024 10:27:23 -0800 Subject: [PATCH] doc update --- demo/nested.html | 6 +----- src/gridstack.ts | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/demo/nested.html b/demo/nested.html index 873b2da97..9366b60f2 100644 --- a/demo/nested.html +++ b/demo/nested.html @@ -54,10 +54,6 @@

Nested grids demo

let sub2 = [ {x:0, y:0, h:2}, {x:1, y:1, w:2}]; let count = 0; [...sub1, ...sub2].forEach(d => d.content = String(count++)); - let subOptions = { - // by default we inherit from parent, but you can override any sub-grid options here - // column: 'auto', // DEFAULT size to match container. make sure to include gridstack-extra.min.css - }; let options = { // main grid options staticGrid, // test - force children to inherit too if we set to true above ^^^ // disableDrag: true, @@ -68,7 +64,7 @@

Nested grids demo

acceptWidgets: true, id: 'main', resizable: { handles: 'se,e,s,sw,w'}, - subGridOpts: subOptions, // all sub grids will default to those + // subGridOpts, // options for all subgrids, but defaults to column='auto' now so no need. children: [ {x:0, y:0, content: 'regular item'}, {x:1, y:0, w:4, h:4, sizeToContent: true, content: '
nested grid sizeToContent:true with some header content
', subGridOpts: {children: sub1, id:'sub1_grid', class: 'sub1'}}, diff --git a/src/gridstack.ts b/src/gridstack.ts index aa0442ad0..a621b7d7a 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -457,7 +457,6 @@ export class GridStack { * grid.addWidget({w: 3, content: 'hello'}); * * @param w GridStackWidget definition. used MakeWidget(el) if you have dom element instead. - * @param options widget position/size options (optional, and ignore if first param is already option) - see GridStackWidget */ public addWidget(w: GridStackWidget): GridItemHTMLElement { if (typeof w === 'string') { console.error('V11: GridStack.addWidget() does not support string anymore. see #2736'); return; }