Describe the bug
When setting enableMultiRowSelection to false and selecting a non-leaf row which has sub rows the last leaf row in the hierarchy is selected instead of the clicked row.
The reproducable example is based on the official row selection example with enableMultiRowSelection set to false.
Your minimal, reproducible example
https://codesandbox.io/s/funny-driscoll-06ptlp?file=/src/main.tsx
Steps to reproduce
- Expand a row and sub rows down to it's leaf rows
- Select any non-leaf row from the expanded rows
--> The last leaf-row is selected but the clicked non-leaf row is not selected
Expected behavior
As a user, I expect to select the clicked row, but I am seeing that another (the last leaf-row in the hierarchy of the clicked row) is selected.
How often does this bug happen?
Every time
Screenshots or Videos

Platform
- OS: Windows
- Browser: Chrome (104), but also Firefox and Edge
react-table version
8.5.11
TypeScript version
4.7.4
Additional context
No response
Terms & Code of Conduct
Describe the bug
When setting enableMultiRowSelection to false and selecting a non-leaf row which has sub rows the last leaf row in the hierarchy is selected instead of the clicked row.
The reproducable example is based on the official row selection example with enableMultiRowSelection set to false.
Your minimal, reproducible example
https://codesandbox.io/s/funny-driscoll-06ptlp?file=/src/main.tsx
Steps to reproduce
--> The last leaf-row is selected but the clicked non-leaf row is not selected
Expected behavior
As a user, I expect to select the clicked row, but I am seeing that another (the last leaf-row in the hierarchy of the clicked row) is selected.
How often does this bug happen?
Every time
Screenshots or Videos
Platform
react-table version
8.5.11
TypeScript version
4.7.4
Additional context
No response
Terms & Code of Conduct