0

You were right that I was not passing the props in correctly. Now I have it set up as such:

Container.jsx

<div className='container' ref={(ref) => {this.foo = ref;}}>
  this.renderContainer()
</div>

<Section scrollContainer={this.foo}/>

Section.jsx (just passing down props)

<Panel scrollContainer={this.props.scrollContainer}/>

Section.propTypes = { scrollContainer: PropTypes.object.isRequired }

Panel.jsx (Passing down props)

<RenderedTable scrollContainer={this.props.scrollContainer} />

RenderedTable.jsx

return (
  <div className='padding-top-20 font-smoothing'>
    <WindowScroller scrollElement={this.props.scrollContainer}>
      {({ height, isScrolling, scrollTop, onChildScroll }) => (
        <AutoSizer disableHeight>
          {({ width }) => (
            <Table

Unfortunately the windowScroller still does not resize. I also dont get any warnings or errors. Do you use css tricks to get the scroller to resize? I see that in the example https://bvaughn.github.io/react-virtualized/#/components/WindowScroller you change the flex and overflow properties when changing the scrollElement from window to scrollingBody.

I know you are very busy and greatly appreciate your help!

user1516734
  • 11
  • 1
  • 4

1 Answers1

0

In your example, you've assigned the scroll ref to this.tabsContainer but you're trying to access it as this.props.tabContainer. Either this is your mistake, or the example is incomplete and more context is needed. :) Can you provide a Plnkr?

bvaughn
  • 13,300
  • 45
  • 46