I am using https://github.com/strml/react-grid-layout to create a layout of items which I can resize and move. The problem I'm having has been raised in multiple issues (below) against the repo with little assistance.
- https://github.com/STRML/react-grid-layout/issues/806
- https://github.com/STRML/react-grid-layout/issues/299
Here is the bit of code that works fine.
<ResponsiveGridLayout
layouts={this.state.layouts}
autoSize={autosize}
breakpoints={breakpoints}
onLayoutChange={(layout, newLayout) =>
this.onLayoutChange(layout, newLayout)}>
<div key="1">...</div>
<div key="2">...</div>
<div key="3">...</div>
</ResponsiveGridLayout>
I would like the ability to nest a custom component within <ResponsiveGridLayout>
like so. Where <CustomComponent />
contains other boxes that can interact.
<ResponsiveGridLayout
layouts={this.state.layouts}
autoSize={autosize}
breakpoints={breakpoints}
onLayoutChange={(layout, newLayout) =>
this.onLayoutChange(layout, newLayout)}>
<div key="1">...</div>
<CustomComponent />
</ResponsiveGridLayout>
Here is a basic reproduction of the problem I'm having.
https://stackblitz.com/edit/react-rncnqr
Thanks in advance!