React window table resets while expanding a row

877 Views Asked by At

I am trying to attain an expandable row using react-window https://github.com/bvaughn/react-window following this sandbox - https://codesandbox.io/s/bvaughnreact-window-variable-size-list-vertical-forked-l10n7

This is what is I did - https://codesandbox.io/s/blazing-tdd-cq868?file=/src/Table.js

But when I expands/collapse a row, the table is resseting and move to the top. In the developor tools, whole table in rerendering for my code. What to do to make my code behave lile the sample above?

enter image description here

0

There are 0 best solutions below