Skip to content

getToggleAllRowsSelectedHandler doesn't take into account enableSubRowSelection property #5116

Description

@gax97

Describe the bug

Even if the table is provided with enableSubRowSelection: false, calling a handler from getToggleAllRowsSelectedHandler will still select all rows.

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/focused-ben-wfks52?embed=1&file=%2Fsrc%2Fmain.tsx%3A148%2C5

Steps to reproduce

  1. Select all columns from the header
  2. Expandable columns are selected even if the enableSubRowSelection = false

Expected behavior

Expandable rows should not be selected if enableSubRowSelection = false

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Chrome, Mac

react-table version

8.10.3

TypeScript version

5.1.3

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable 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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions