The flex option works very well except that it seems to put all the remaining space in the last column. Am I doing something wrong?
height:"500",
width:"100%",
colModel,
scrollModel: { autoFit: true },
groupModel,
groupOption: function( event, {ui, oldGM, source} ) {
const groupModel = this.option("groupModel");
toggleGroupColumnsVisible( groupModel.dataIndx);
},
flex: { on: true },
function toggleGroupColumnsVisible(groupColumns) {
const showGroupColumn = _.isArray(groupColumns) ? groupColumns.length > 0 : groupColumns;
colModel = showGroupColumn ? [groupColumn, ...colModelFromServer] : colModelFromServer;
if (_.isArray(groupColumns)){
const columnsToHide = new Set(groupColumns);
_.map(colModel, c => c.hidden = columnsToHide.has(c.dataIndx))
}
pqGridInstance.option( "colModel", colModel );
pqGridInstance.refreshView(colModel);
pqGridInstance.flex();
}