Is is possible to get a checkbox to appear for leaf nodes in row groups when the grid is configured to display multiple columns for the groups?
Plunker example: https://plnkr.co/edit/KlEOO7ro9WvlYHDU in this instance I want checkboxes to appear for the "Athlete" column but only when the leaf nodes are visible
If I add 'checkboxSelection': true
to the column definition then the checkbox is shown even when the group is collapsed:
The AG Grid documentation has an example of nearly I want but that only works when all of the groups appear in a single column and the group column has a field assigned to it ahead of time https://www.ag-grid.com/javascript-data-grid/row-selection/#example-groups--checkbox-selection
I may be able to work around it with CSS or a custom renderer but I'd rather do it with configuration
I found the solution, I can use the function form of checkboxSelection
and inspect whether the current node is a group or not
checkboxSelection: (params) => !params.node.group;
Updated working plunker https://plnkr.co/edit/x38j1tDGuJoKIOUg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With