Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Virtualized - onclick, expand Rows for additional details

I have a requirement to open/close additional row details.

Has anyone implemented or have ideas on how to go about implementing expand/collapse feature for each row?

like image 732
Q-Ball Avatar asked Dec 12 '16 16:12

Q-Ball


1 Answers

There's a template of sorts for this sort of thing (demo, source) The important bit is that you'll need to tell your List/Grid/whatever when an open/close has changed (aka when size might have changed), eg:

this._listRef.recomputeRowHeights(indexOfChangedRow) // Clear cached size
this._listRef.forceUpdateGrid() // Rerender list with new size
like image 126
bvaughn Avatar answered Oct 07 '22 23:10

bvaughn