How could the fixed width layout cell be stretched to full width if the adjacent cell is collapsed

Say, a layout with two columns.
Please replace the JS code with below in https://snippet.dhtmlx.com/yr9mapji?text=layout:
const layout = new dhx.Layout(“layout”, {
type: “space”,
cols: [
{
id: “С1”,
html: “1”,
collapsable:true,
},
{
id: “С2”,
html: “2”,
collapsable:true,
//width:“30%”,
},
]
});

And toggle the comment (width).
If the line is commented and either of the columns is collapsed, another column will stretch to full width automatically, which I desire.

But if the line is uncommented, i.e. the width is set, and if the C1 is collapsed, C2 stays 30% width.


I hope the C2 could stretch to full width. How can I achieve this.
Thx.

Please, try to set the width of the cell 1 to “60%”:
https://snippet.dhtmlx.com/7cjmxkw1

Thanks sematic.
But this way, cell1 will be fixed 60% width if cell 2 is collapsed.
I hope if both cells are expanded, the width is as set. But if some are collpased, the expanded others should occupy the full width.

There is no possibility to configure such a complex scenario for the layout cells.