table icon indicating copy to clipboard operation
table copied to clipboard

getToggleAllRowsSelectedHandler doesn't take into account enableSubRowSelection property

Open gax97 opened this issue 2 years ago • 0 comments

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

  • [X] I agree to follow this project's Code of Conduct
  • [X] 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.

gax97 avatar Oct 05 '23 10:10 gax97