Ag-grid hiding rows

Viewed 16498

Is there any implemented functionality to conditionally hide rows?

I instantiate them like this:

let rows = [
    { name: "Adam", isVisible: true },
    { name: "Bert", isVisible: true },
    { name: "Carl", isVisible: false }
];

for(let row of rows)
  row["height"] = row.isVisible ? 25 : 0;

this.rowData = rows;

And then I provide this function to set the row height:

this.gridOptions.getRowHeight = (params) => {
    return params.data.height;
}

This is not a perfect solution, especially because if the grid ends with a row of height 0 it shows that row anyway (with the height of 4px or so)

2 Answers
Related