Skip to content

subgrid: rendering a component in items of the subgrid not possible #2240

@ringodotnl

Description

@ringodotnl

Subject of the issue

Setup gridstack with a subgrid and items. Render a component in the items of subgrid doesn't seems to be possible.
It only render a component inside a subgrid instead of in a item of the subgrid.

Your environment

gridstack v7.2.3 dev, with Angular

Expected behavior

Should be a way to render a component inside a item.

Using:

private _addRemoveCB(g: GridStack, w: GridStackWidget, add: boolean): HTMLElement | undefined {
if (add) {
if (!this.container) return;
// create the grid item dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html
const gridItem = this.container.createComponent(GridstackItemComponent)?.instance;
return gridItem?.el;
}
// if (this.outsideAddRemove) this.outsideAddRemove(g, w, add); // TODO: ?
return;
}

Hope someone can help me with this.
Cheers.
Ringo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions