Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cea18b6

Browse files
authored
Merge pull request gridstack#2555 from vmihailenco/master
chore: replace addSubGrid with makeSubGrid
2 parents 4565300 + a0af60a commit cea18b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ v10.x supports a much richer responsive behavior, you can have breakpoints of wi
149149
- `cancel`?: string - prevents dragging from starting on specified elements, listed as comma separated selectors (eg: '.no-drag'). default built in is 'input,textarea,button,select,option'
150150

151151
### DDDragInOpt extends DDDragOpt
152-
- `helper`?: 'clone' | ((event: Event) => HTMLElement) - helper function when dropping (ex: 'clone' or your own method)
152+
- `helper`?: 'clone' | ((event: Event) => HTMLElement) - helper function when dropping (ex: 'clone' or your own method)
153153

154154
## Grid attributes
155155

@@ -334,7 +334,7 @@ let grids = GridStack.initAll();
334334
grids.forEach(...)
335335
```
336336

337-
### `addGrid(parent: HTMLElement, opt: GridStackOptions = {}): GridStack `
337+
### `addGrid(parent: HTMLElement, opt: GridStackOptions = {}): GridStack `
338338

339339
* call to create a grid with the given options, including loading any children from JSON structure. This will call `GridStack.init()`, then `grid.load()` on any passed children (recursively). Great alternative to calling `init()` if you want entire grid to come from JSON serialized data, including options.
340340
* @param parent HTML element parent to the grid
@@ -385,7 +385,7 @@ re-layout grid items to reclaim any empty space. Options are:
385385
- `'compact'` might re-order items to fill any empty space
386386

387387
- `doSort` - `false` to let you do your own sorting ahead in case you need to control a different order. (default to sort)
388-
388+
389389

390390
### `cellHeight(val: number, update = true)`
391391

@@ -522,7 +522,7 @@ let grid = GridStack.init();
522522
grid.el.appendChild('<div id="gsi-1" gs-x="0" gs-y="0" gs-w="3" gs-h="2" gs-auto-position="true"></div>')
523523
grid.makeWidget('#gsi-1');
524524
```
525-
### `makeSubgrid(el)`
525+
### `makeSubGrid(el)`
526526
Used to add a subgrid into an existing grid.
527527
```js
528528
const grid = Gridstack.init()
@@ -533,7 +533,7 @@ grid.el.appendChild(`
533533
</div>
534534
</div>
535535
</div>`)
536-
grid.addSubGrid(grid.el.getElementById('nested-grid'))
536+
grid.makeSubGrid(grid.el.getElementById('nested-grid'))
537537
```
538538
Make sure that the subgrid is inside of a grid item. It is important to remember that subgrids are themselves grid items capable of containing other grid items.
539539
### `margin(value: numberOrString)`

0 commit comments

Comments
 (0)