8000 Outdated documentation for load() · Issue #2966 · gridstack/gridstack.js · GitHub
[go: up one dir, main page]

Skip to content 8000
Outdated documentation for load() #2966
Closed
@E4RIJMP

Description

@E4RIJMP

Hello the JSDoc (and README.md) for load does not match the actual implementation:

    /**
     * load the widgets from a list. This will call update() on each (matching by id) or add/remove widgets that are not there.
     *
     * @param layout list of widgets definition to update/create
     * @param 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.
     *
     * @example
     * see http://gridstackjs.com/demo/serialization.html
     */
    load(items: GridStackWidget[], addRemove?: boolean | AddRemoveFcn): GridStack;

The params are items (not layout) and addRemove (not addAndRemove).

See:

public load(items: GridStackWidget[], addRemove: boolean | AddRemoveFcn = GridStack.addRemoveCB || true): GridStack {

### `load(layout: GridStackWidget[], boolean | ((w: GridStackWidget, add: boolean) => void) = true)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0