DEV Community

Ajay
Ajay

Posted on

How to stop expanded React-Table row from collapsing on state change

How to prevent expanded React-Table row from collapsing on state change in class component.

Please find the code link here https://codesandbox.io/s/agitated-dubinsky-t0hcn?file=/src/nestead-table/index.js

on selecting checkbox (state update) the expanded row is getting collapsed please help me in solving this.

Thanks in Advance.

Top comments (2)

Collapse
 
tzii profile image
Vu • Edited

you recalculate columns every renderer. columns must be memoized

Collapse
 
1ajay121 profile image
Ajay

I tried it but it's not working for nestead og sub tables