3

I'm using a List inside and AutoSizer with a dynamic height using a function for rowHeight. The row in my use case needs to render with ellipsis and expand upon clicking on it.

I'm wondering how to go about dynamically setting the rowHeight once the row has already been rendered?

Anshuul Kai
  • 3,876
  • 2
  • 27
  • 48

1 Answers1

4

Here is an example of doing something similar (and here is the source code). The key part is here:

// When height changes externally, let List know to reset its cached size
List.recomputeRowHeights()
List.forceUpdate()
bvaughn
  • 13,300
  • 45
  • 46
  • from docs: `recomputeRowHeights()` - ... This method will also force a render cycle (via forceUpdate) ... – Yuki Aug 20 '19 at 12:47