react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

A previously selected row that becomes disabled should be unselected

Open lu-zen opened this issue 1 year ago • 0 comments

Issue Check list

  • [x] Agree to the Code of Conduct
  • [x] Read the README
  • [x] You are using React 16.8.0+
  • [x] You installed styled-components
  • [ ] Include relevant code or preferably a code sandbox

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)

  • React (RDT requires 16.8.0+) 18.2.0
  • RDT 7.6.2
  • Styled Components 5.3.11
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari, firefox]

lu-zen avatar Feb 26 '24 20:02 lu-zen