jbetancur / react-data-table-component

A responsive table library with built-in sorting, pagination, selection, expandable rows, and customizable styling.
https://react-data-table-component.netlify.app
Apache License 2.0
2.03k stars 409 forks source link

A previously selected row that becomes disabled should be unselected #1213

Open lu-zen opened 6 months ago

lu-zen commented 6 months ago

Issue Check list

Describe the bug

When a row becomes disabled based on selectableRowDisabled check, it stays selected.

To Reproduce

Steps to reproduce the behavior: Create any table with a single row that's enabled, check it, change data to make it disabled. Observe it's still selected.

Expected behavior

Disabled rows should be unselected when new data arrives.

Code Sandbox, Screenshots, or Relevant Code

image

Versions (please complete the following information)