I want to count the number of selected rows but it seems onRowClicked or onRowSelected happens before the row i click actually is selected.
How can I count the number of rows when I select a row? I thought this was the way to go.
this.gridOptions.onRowSelected = function (params) {
console.log(this.gridOptions.api.getSelectedRows().length)
// Prints one less then the number of rows that is selected.
}