Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSelectedRowsChange does not fire if clearSelectedRows is toggled #1214

Open
5 tasks done
ADTC opened this issue Mar 12, 2024 · 0 comments
Open
5 tasks done

onSelectedRowsChange does not fire if clearSelectedRows is toggled #1214

ADTC opened this issue Mar 12, 2024 · 0 comments

Comments

@ADTC
Copy link
Contributor

ADTC commented Mar 12, 2024

Issue Check list

  • Agree to the Code of Conduct
  • Read the README
  • You are using React 16.8.0+
  • You installed styled-components
  • 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant