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

Skip to content

Gridstack stopped working in version 2.0.0 and above if the class="grid-stack" element is a web-component with shadow-dom! #1438

Closed
@bhutiyakishan1

Description

@bhutiyakishan1

Gridstack stopped working in version 2.0.0 and above if the class="grid-stack" element is a web-component with shadow-dom!

I was on version grid-stack 1.2.0 before, and i am using it inside a web-component where the top most element(class="grid-stack) is a web-component and has a shadow-dom, it was working perfectly until i moved to version 2.0.0! Also tried checking the latest, 2.1.0! But with that version it doesn't work either!

Your environment

  • 2.0.0 and above
  • Chrome latest

Steps to reproduce

<vi-dashboard id="dashboardEl" class="grid-stack">
  <vi-panel loc-x="0" loc-y="0" width="3" height="3" class="grid-stack-item">
       <div class="grid-stack-item-content></div>
  </vi-panel>
  <vi-panel loc-x="3" loc-y="0" width="3" height="3" class="grid-stack-item>
       <div class="grid-stack-item-content></div>
  </vi-panel>
</vi-dashboard>

If you see above markup, vi-panel and vi-dashboard are both web-components! vi-panel being a webcomponent works fine! But if vi-dashboard is a web-component, it doesnt render properly! With no errors in console!

Expected behaviour

It should render properly as normal grid-stack demo!
Screen Shot 2020-11-03 at 3 06 16 PM

Actual behaviour

Everything is stacked at one place ! Drag-drop and resizing doesn't work either!

Screen Shot 2020-11-03 at 3 05 55 PM

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