Skip to content

Deselect all will also deselect the disabled row (row initially checked) #477

@domi-glyph

Description

@domi-glyph

material-react-table version

v1.9.2

react & react-dom versions

v18.2.0

Describe the bug and the steps to reproduce it

Initially the table will have several rows that is "checked"
const [rowSelection, setRowSelection] = useState({ "3f25309c-8fa1-470f-811e-cdb082ab9017": true });

Table is given props to filter disabled rows
enableRowSelection={(row) => row.original.age < 20}

Steps to reproduce :

  1. toggle check all
  2. toggle again to uncheck all
    Here you will notice the disabled row will also uncheck, and if you try to toggle select all, it can't be "checked".

Current behavior:

  • initially checked and disabled row become unchecked after toggling deselect all.

Expected behavior:

  • initially checked and disabled row remains checked even after toggling deselect all.

Minimal, Reproducible Example - (Optional, but Recommended)

https://codesandbox.io/s/awesome-bird-0b8zex?file=/src/App.js

Steps to reproduce :

  1. toggle check all
  2. toggle again to uncheck all
    Here you will notice the disabled row will also uncheck, and if you try to toggle select all, it can't be "checked".

Screenshots or Videos (Optional)

bandicam.2023-04-18.17-00-13-939.mp4

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions