[x] Include relevant code or preferably a code sandbox
Describe the bug
onSelectedRowsChange does not fire if clearSelectedRows is toggled. Selection is cleared visually, but the callback is not fired to update with new selection count (which is zero) or selected rows list (which is empty).
To Reproduce
Make a DataTable which has both. Select some rows. Use some button to toggle clearSelectedRows and observe the effect of onSelectedRowsChange (output it to console or update some div with it).
Expected behavior
Any time the selection changes for any reason, onSelectedRowsChange must always fire.
Note: I have keyField defined correctly.
(Pressed for time right now. I can add more details later.)
Issue Check list
styled-components
Describe the bug
onSelectedRowsChange
does not fire ifclearSelectedRows
is toggled. Selection is cleared visually, but the callback is not fired to update with new selection count (which is zero) or selected rows list (which is empty).To Reproduce
Make a
DataTable
which has both. Select some rows. Use somebutton
to toggleclearSelectedRows
and observe the effect ofonSelectedRowsChange
(output it to console or update somediv
with it).Expected behavior
Any time the selection changes for any reason,
onSelectedRowsChange
must always fire.Note: I have
keyField
defined correctly.(Pressed for time right now. I can add more details later.)