Replies: 4 comments 2 replies
-
@deeps111 hey, were you able to figure this out? thanks! |
Beta Was this translation helpful? Give feedback.
-
For anyone else, I have managed to solve this by setting |
Beta Was this translation helpful? Give feedback.
-
do you have full example @Satys, i have lazy loaded data from api https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/sub-components-lazy?file=/src/makeData.js but when i expaned and select any of subrow, all subrows are selected and also i only get in selection the main parent row, |
Beta Was this translation helpful? Give feedback.
-
@deeps111 If you have solved this, kindly post the solution. |
Beta Was this translation helpful? Give feedback.
-
Hi @tannerlinsley ,
Could you please let me know ,how to create subRows dynamically on click of expand icon and show in the UI as sub-rows of expanded rows?
Scenario : Expand a specific row in react-table7.0.0 , call api to get the sub-rows and show the sub-rows in the table as children of expanded row.
Issue : I have followed the given sub component documentation (https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/sub-components-lazy?file=/src/makeData.js ) and the expansion is working fine for 1st level but to expand the sub-rows , expand icon is not available as well as row id & depth of sub-rows is same as of parent .
Expected row id's -
expanded : {
‘1’:true, // 1st row
‘1.0’:true, //first child of1st row
‘1.1’:true, //second child of 1st row
‘2’:true,
‘2.0’:true, //1st child of 2nd row
‘2.0.2’:true, //2nd child of (1st child of 2nd Row)
}
Actual Expanded row id's -
expanded : {
‘1’:true,
‘1.0’:true, // this is not available
‘2’:true,
}
Thanks in Advance !
:)
Beta Was this translation helpful? Give feedback.
All reactions