Below is link to simple github demo.
I'm trying to create a gridster app. Gridster will fit itself in screen. Gridster item will consists of some scrollable part (like not-scrollable header + scrollable content).
Ideally I would like the scrollable part to contain the remaining area of the gridster item. I can manage to get the entire item scrollable by setting css overflow property, but not the part.
the gridster config:
gridsterOptions: GridsterConfig = {
gridType: 'fit',
compactType: 'compactUp',
minCols: 1,
maxCols: 12,
minRows: 1,
maxRows: 12,
outerMarginLeft: 4,
outerMarginRight: 4,
outerMarginTop: 4,
displayGrid: 'always',
defaultItemCols: 1,
defaultItemRows: 1,
minItemCols: 1,
maxItemCols: 12,
minItemRows: 1,
maxItemRows: 12,
itemChangeCallback: (newPosition) => {
console.log('grid item event: ', newPosition);
// todo, save changed gridster layout into user's profile?
},
draggable: {
enabled: true
},
resizable: {
enabled: false
},
pushItems: true,
pushResizeItems: false,
swap: true
};
AppComponent:
<gridster [options]="gridsterOptions">
<gridster-item [item]="widget" *ngFor="let widget of dashboard">
<p>
some non scrollable text
</p>
<div style="overflow: scroll;">
<p>
very big content here which should scroll to the end of gridster item
</p>
</div>
</gridster-item>
</gridster>
My question is how to make the div
have the size only to the end of the gridster item?
Many thanks for the help