Step 1 :online samples for DHTMLX Layout.
Step 2 : Layout. 2E
Step 3:Replace JavaScript and html content with the following
In the horizontal screen with only 1080 height:
How can I ensure that table2 can appear on the screen after opening and folding table1?
Only table2 meets this style: flex: 1 1 auto; min-height:333px
However, this style, min height, is not effective in the style, and must be implemented with the minHeight parameter of the cell. But minHeight causes flex: 0 1 auto;
This is unreasonable.
In the vertical screen with a height of 2048:
After folding is turned off under the name table1, the table2 screen displays completely?
The height parameter must not be used
javascript
const layout = new dhx.Layout("layout", {
type: "none",
height:"100%",
rows: [{
css:'bbbb',
rows:[{
id: "form",
height:"200",
html:"Here is a form "
},{
type: "none",
header: "table1",
height:"1030",
collapsable: true,
collapsed: true,
},{
type: "none",
header: "table2",
id: "table2",
css:"aaaa",
}],
}, {
type: "none",
html:"toolbar buttion",
id: "toolbar",
height: "56"
}
]
});
const grid = new dhx.Grid(null, {
columns: [
{ id: "title", gravity: 3, header: [{ text: "Title" }] },
{ id: "authors", gravity: 2, header: [{ text: "Authors" }] },
{ id: "average_rating", header: [{ text: "Rating" }] },
{ id: "publication_date", header: [{ text: "Publication date" }], type: "date", dateFormat: "%d/%m/%Y" },
],
autoWidth:true,
adjust:false
});
layout.getCell("table2").attach(grid)
grid.data.load("https://snippet.dhtmlx.com/codebase/data/grid/01/dataset.json");
html
<!-- component container -->
<div id="layout" style="height: 100%;"></div>
<!-- custom styles -->
<style>
.aaaa {
background-color: olive;
min-height:300;
}
.bbbb {
overflow-y: auto;
}
</style>