I have a requirement where I need to delete/hide leaf level record in ag grid since it shows the confusing behavior to the end user. As shown in the screenshot I need to delete/hide last records(highlighted in red) in each group since the record above it depicts the same data.
I have tried to remove using updateRowData like this:
this.gridApi.forEachLeafNode(function(rowNode, index) {
self.gridApi.updateRowData({ remove: [rowNode.data] });
});
The above piece of code deletes all data since in my case the data shown in 2nd and 3rd(leaf) level are same. Is there anyway I can delete only the one's that are marked in red.
Also I have tried other techniques like adding data to leaf level records as the document suggests, but nothing worked.
PS: Deleting may not be the only option. If its possible not to render then also the requirement will be fulfilled. Any guidance will be helpful
