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

Skip to content

typing error in React #2960

Open
Open
@chungwong

Description

@chungwong

removeWidget takes type GridStackElement = string | HTMLElement | GridItemHTMLElement

public removeWidget(els: GridStackElement, removeDOM = true, triggerEvent = true): GridStack {..}

And the react version is violating the above

  removeWidget: (id: string) => void;

This triggered a chain of changes and there is on concern with one of the changes,

<GridStackWidgetContext.Provider key={id} value={{ widget: { id } }} />

Note key={id} here, id is GridStackElement which it could be a HTMLElement and I don't think it is ideal to pass HTMLElement as the key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions