First about the react-window
: The Scollbars in the react-window
are for the outercontainer
not for InnerContainer
. Now don't try to replace the outer container itself, unless you want to handle everything yourself. All the scroll events a few more things are attached to the outercontainer
.
Think of it like outer container decides/takes the size and the larger inner container gets scrolled inside it.
Now looking at your case I assume you are trying to make the table behave like any other grid where headers are fixed and content is scrolled if it's getting overflow. your table header is way lower in the element hierarchy than the inner container, so no way you can write any simple css (or js logic) to achieve in current hierarchy.
that's why even though you have set the stickyheader
for the MaterialUI
table
, it won't stick. Cause your whole table (MaterialUI
table
) is getting scrolled inside the outer container of react-window
.
I would suggest you to move your table header outside of the react-window
and only place the rows in the react-widow
. that's the way it's suppose to behave (i.e. react window treats everything in it as scrollable content). See one of the presentation below:

A little tip on redesigning of your table
(guess the alignment can be improved by additional css)
