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

Skip to content

Commit 00e40f4

Browse files
committed
doc fix #2966
1 parent 271efcc commit 00e40f4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ gridstack.js API
5050
- [`getGridItems(): GridItemHTMLElement[]`](#getgriditems-griditemhtmlelement)
5151
- [`getMargin()`](#getmargin)
5252
- [`isAreaEmpty(x, y, width, height)`](#isareaemptyx-y-width-height)
53-
- [`load(layout: GridStackWidget[], boolean | ((w: GridStackWidget, add: boolean) => void) = true)`](#loadlayout-gridstackwidget-boolean--w-gridstackwidget-add-boolean--void---true)
53+
- [`load(items: GridStackWidget[], addRemove: boolean | AddRemoveFcn = GridStack.addRemoveCB || true)`](#loaditems-gridstackwidget-addremove-boolean--addremovefcn--gridstackaddremovecb--true)
5454
- [`makeWidget(el)`](#makewidgetel)
5555
- [`makeSubGrid(el)`](#makesubgridel)
5656
- [`margin(value: numberOrString)`](#marginvalue-numberorstring)
@@ -496,13 +496,13 @@ returns current margin value (undefined if all 4 sides don't match).
496496

497497
Checks if specified area is empty.
498498

499-
### `load(layout: GridStackWidget[], boolean | ((w: GridStackWidget, add: boolean) => void) = true)`
499+
### `load(items: GridStackWidget[], addRemove: boolean | AddRemoveFcn = GridStack.addRemoveCB || true)`
500500

501501
- load the widgets from a list (see `save()`). This will call `update()` on each (matching by id) or add/remove widgets that are not there.
502-
- Optional `addAndRemove` boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving the user control of insertion.
502+
- Optional `addRemove` boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving the user control of insertion.
503503

504504
- used to restore a grid layout for a saved layout list (see `save()`).
505-
- `addAndRemove` boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving the user control of insertion.
505+
- `addRemove` boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving the user control of insertion.
506506
- see [example](http://gridstackjs.com/demo/serialization.html)
507507

508508
### `makeWidget(el)`

src/gridstack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ export class GridStack {
699699
/**
700700
* load the widgets from a list. This will call update() on each (matching by id) or add/remove widgets that are not there.
701701
*
702-
* @param layout list of widgets definition to update/create
703-
* @param addAndRemove boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving
702+
* @param items list of widgets definition to update/create
703+
* @param addRemove boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving
704704
* the user control of insertion.
705705
*
706706
* @example

0 commit comments

Comments
 (0)