Open
Description
I am trying to initialize a sub-grid from HTML attributes, but can't find many examples except this one.
I am trying something like this (https://jsfiddle.net/0wvsym1j/2/):
<div class="grid-stack" id="gs">
<div gs-w="6" gs-h="4" gs-auto-position="true" class="grid-stack-item grid-stack-sub-grid">
<div class="grid-stack-item-content">
<div class="grid-stack grid-stack-nested">
<div gs-w="3" gs-h="2" gs-auto-position="true" class="grid-stack-item">
<div class="grid-stack-item-content">
<div>
Subgrid
</div>
</div>
</div>
</div>
</div>
</div>
</div>
And then initialize it separately:
let grid = GridStack.init(options, '#gs')
let subgrids = GridStack.initAll({
...options,
column: 'auto',
},
'.grid-stack-nested'
)
Could someone suggest a proper way?