Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 447

How to ensure only one row can be expanded at any time using react-table?

$
0
0

I am using react-table library. My requirement is to ensure only one row is expanded at any time. If I expand any row, another row which already expanded need to collapse. I got to know to achieve this I need to provide implementation for onExpandedChange. I have tried many implementationswhich are available in stackoverflow but didn't work out. Could any one help me with correct implementation for onExpandedChange to achieve only one row at any time can expand, using react functional components.

I tried implementation for onExpandedChange, which are available in below link.

https://58000774.isolation.zscaler.com/profile/53805299-7c8b-4e0b-85bd-0c4279349fea/zia-session/?tenant=6ec9fe36c097&region=hyd&controls_id=f3e25fc7-af4d-46b0-8121-8208cde883c1&user=a451f8ecb15fe28ba1b3cafacc8b7f881ac818ab1b0ebfa68cb88ebf1c03ab97&original_url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F47140217%2Fhow-to-collapse-other-expanded-rows-in-react-table&key=sh-1&hmac=a60ea03b33559709f88e0ba126511391e1e82f98f1d718329c389f6cb3839d71.

I am expecting correct implementation for onExpandedChange to achieve only one row at any time can be expanded, using react functional components.


Viewing all articles
Browse latest Browse all 447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>