I have implemented an Infinite scrolling table with react-window (based on #60) and material UI.
The table seems to be fulfilling the main objective but there are few issues with it -
- header is not sticking on the top in spite of having styles in place (
stickyHeader
prop). - header is flashing/flickering while scrolling quickly towards up direction. [Steps to reproduce - scroll 50% down then do fast scroll up and observe the header movement ].
Here's the codesandbox example - https://codesandbox.io/s/react-window-with-table-elements-forked-huti6?file=/src/index.tsx:514-542
As an alternative to your implementation, the Material UI docs have a working example of a virtualized table which achieves what you're looking for using
react-virtualized
. That is, the header is sticky and there is no flashing/flickering of the header during scroll.Below is a codesandbox containing a working example to reflect your desired layout.