0

I use WindowScroller to scroll on window level but instead scrollbar shows in table level. What I do wrong ?

<WindowScroller>
                {(scroll) => {
<Table
                headerHeight={0}
                rowHeight={480}
                rowCount={rowsCount}
                isScrolling={scroll.isScrolling}
                scrollTop={scroll.scrollTop}
                onScroll={scroll.onChildScroll}
                rowGetter={({index}) => {...}
                height={props.size.height}
                width={props.size.width}>
...
</Table>
}
            </WindowScroller>

I use 9.18.5 version. WindowScroller has some specific requirments to display on window level?

matiii
  • 316
  • 4
  • 17

1 Answers1

0

The problem was related to CSS. I had to change structure of html to get window scrolling effect. I had to setup high as auto in 9.18.5 version as well.

div.ReactVirtualized__Grid.ReactVirtualized__Table__Grid {
    height: auto!important;
}
matiii
  • 316
  • 4
  • 17
  • 1
    I'm having the same issue, would you mind sharing the code to your answer? – Jaime Sangcap Sep 25 '18 at 14:46
  • I set height property in Table component with original value. Thus in order to scrollbar show up, height of table should be higher than height of window. Then WindowScroller will handle it. In version 9.18.5 I had to setup css like above. – matiii Oct 14 '18 at 08:31