You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the selectAllRows method is raising rowSelectionChangedBatch prior to setting the selection.selectAll flag. Due to this, you're unable to determine if all rows were selected via getSelectAllState().
From looking at the code a bit more, it's actually the selectAllVisibleRows method that get's called when the select all checkbox is clicked and this appears to have the same issue as selectAllRows.
After updating a forked copy of the code, I noticed that the clearSelectedRows method is invoking the decideRaiseSelectionBatchEvent prior to setting the selectAll and causes getSelectAllState to return true when it should be false inside rowSelectionChangedBatch
It appears that the selectAllRows method is raising rowSelectionChangedBatch prior to setting the selection.selectAll flag. Due to this, you're unable to determine if all rows were selected via getSelectAllState().
selectAllRows
service.decideRaiseSelectionBatchEvent(grid, changedRows, evt);
grid.selection.selectAll = true;
However, this doesn't appear to be the case with the service.toggleRowSelection function that's called when a single row has been selected.
toggleRowSelection
selectedRows = service.getSelectedRows(grid);
grid.selection.selectAll = grid.rows.length === selectedRows.length;
grid.api.selection.raise.rowSelectionChanged(row, evt);
From looking at the code a bit more, it's actually the selectAllVisibleRows method that get's called when the select all checkbox is clicked and this appears to have the same issue as selectAllRows.
selectAllVisibleRows
service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
grid.selection.selectAll = true;
After updating a forked copy of the code, I noticed that the clearSelectedRows method is invoking the decideRaiseSelectionBatchEvent prior to setting the selectAll and causes getSelectAllState to return true when it should be false inside rowSelectionChangedBatch
clearSelectedRows
service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
grid.selection.selectAll = false;
grid.selection.selectedCount = 0;
The text was updated successfully, but these errors were encountered: