React-table: Toggle all row selected not working for subRow

Created on 11 Jul 2020  路  2Comments  路  Source: tannerlinsley/react-table

Describe the bug (required)
Toggle all row selected not working for subRow

Provide an example via Codesandbox! (required)
codesandbox: https://codesandbox.io/s/crimson-river-ymw1p?file=/src/App.js

Expected behavior (Recommended)
I'm not sure if this is a bug,
when i click toggle all row checkbox,it is not working for subrow

Screenshots
2020-07-11 14-47-49

Desktop (please complete the following information):

  • OS:ubuntu20.04
  • chrome
  • latest

Most helpful comment

Hi @pjshu,

I think you should place useExpanded hook before useRowSelect. here is a working demo

I just checked the souce code: useRowSelect hook must be placed after these hooks: ['useFilters', 'useGroupBy', 'useSortBy']. But there is no useExpanded included in the array. So mostly this should be handled from the library, But the above change I mentioned will solve this issue.

All 2 comments

Hi @pjshu,

I think you should place useExpanded hook before useRowSelect. here is a working demo

I just checked the souce code: useRowSelect hook must be placed after these hooks: ['useFilters', 'useGroupBy', 'useSortBy']. But there is no useExpanded included in the array. So mostly this should be handled from the library, But the above change I mentioned will solve this issue.

Hi @pjshu,

I think you should place useExpanded hook before useRowSelect. here is a working demo

I just checked the souce code: useRowSelect hook must be placed after these hooks: ['useFilters', 'useGroupBy', 'useSortBy']. But there is no useExpanded included in the array. So mostly this should be handled from the library, But the above change I mentioned will solve this issue.

thanks!!!slove my problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Abdul-Hameed001 picture Abdul-Hameed001  路  3Comments

monarajhans picture monarajhans  路  3Comments

Codar97 picture Codar97  路  3Comments

dwjft picture dwjft  路  3Comments

DaveyEdwards picture DaveyEdwards  路  3Comments