Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itemClass Causes Malformed Item #2110

Closed
jasondalycan opened this issue Nov 23, 2022 · 2 comments · Fixed by #2164
Closed

itemClass Causes Malformed Item #2110

jasondalycan opened this issue Nov 23, 2022 · 2 comments · Fixed by #2164

Comments

@jasondalycan
Copy link

jasondalycan commented Nov 23, 2022

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.

@adumesny
Copy link
Member

can you post a running example (use bug template please).

adumesny added a commit to adumesny/gridstack.js that referenced this issue Jan 14, 2023
* fix gridstack#2110
* custom `GridStackOptions.itemClass` now works when dragging from outside
* updated two.html to showcase issue
@adumesny adumesny mentioned this issue Jan 14, 2023
3 tasks
@adumesny
Copy link
Member

fix in next release - pease donate if oyu find this lib useful!

adumesny added a commit to adumesny/gridstack.js that referenced this issue Jan 16, 2023
* while fixing gridstack#2110 I broke nested grid styles when manually dragging to sub-nest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants