React Virtualized - onclick, expand

/ .

- , expand/collapse ?

+13
4

(demo, ). , List/Grid/, / (, ), :

this._listRef.recomputeRowHeights(indexOfChangedRow) // Clear cached size
this._listRef.forceUpdateGrid() // Rerender list with new size
+15
+6

I was looking for the same function, but I did not find any useful results, as I was looking, maybe this sandbox helps others looking for a similar function in their applications:

The example is used Tablefrom react-virtualizednext to react hooks.

example

+2
source

I tried to implement the solution, but as soon as I expand the line, the list will change the top scroll position. any clue?

0
source

Source: https://habr.com/ru/post/1663533/


All Articles