Skip to content

itemClass Causes Malformed Item #2110

Closed
@jasondalycan

Description

@jasondalycan

When dropping a widget into a grid, setting itemClass causes the dropped widget to land at the top of the grid and the widget becomes malformed. For example, the following grid does this:

let myGrid = GridStack.init(
            {   acceptWidgets: ".my-widget-class",
                itemClass: "my-widget-class-with-gridlines"
            }, document.querySelector(`#myCanvasId`));

The class contents are simple:

.my-widget-class-with-gridlines
{
    border: 1px dotted #cccccc;

}

Removing the itemClass parameter from GridStack.init() resolves the issue, and adding it back causes the issue again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions