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.06k stars 413 forks source link

[BUG] Pre-selected disabled rows get unselected when Header checkbox is unchecked #1256

Open arif-js opened 1 month ago

arif-js commented 1 month ago

Issue Check list

Describe the bug

I have pre selected a row and pre disabled the same row, but when I uncheck the header select all checkbox, that row becomes unselected. That is unexpected, because I need that row to be selected and not changeable.

To Reproduce

Steps to reproduce the behavior:

  1. set these values selectableRows={selectableRows} onSelectedRowsChange={onSelectedRowsChange} selectableRowDisabled={selectableRowDisabled}
  2. Now uncheck the header column select all checkbox

Expected behavior

Even if the header row is unchecked, the preselected disabled row should not get unchecked

image

Versions (please complete the following information)