title: How to scroll to index in infinite list with react-virtualized
body: <p>I have an infinite list (using components <code>InfiniteLoader</code> and <code>List</code> from the awesome <code>react-virtualized</code> library). I want to scroll to a specific row to respond to a user generated event.</p>
  
  <p>This is my code : </p>
  
  <pre><code>class Weeks extends Component {
    constructor(props) {
      super(props)
      this.state = {
        week_count: 10,
      }
      auto_bind(this)
    }
  
    is_week_loaded(week) {
      return week &lt; this.state.week_count
    }
  
    load_more_weeks() {
      this.setState({week_count: this.state.week_count + 1})
    }
  
    scroll_to_week(week) {
      if (this.state.week_count &lt;= week) {
        this.setState({week_count: week + 1})
      }
      this.list.scrollToRow(week)
    }
  
    render_week({key, index, style}) {
      return (
        &lt;div key={key} style={style}&gt;
          &lt;Week week={index}/&gt;
        &lt;/div&gt;
      )
    }
  
    render() {
      return (
        &lt;AutoSizer&gt;
          {({height, width}) =&gt; (
            &lt;InfiniteLoader
              isRowLoaded={this.is_week_loaded}
              loadMoreRows={this.load_more_weeks}
              rowCount={this.state.week_count + 1}
              &gt;
              {({onRowsRendered, registerChild}) =&gt; (
                &lt;List
                  height={height}
                  width={width}
                  onRowsRendered={onRowsRendered}
                  ref={(list) =&gt; {
                    this.list = list
                    registerChild(list)
                  }}
                  rowCount={this.state.week_count}
                  rowHeight={row_height}
                  rowRenderer={this.render_week}
                  /&gt;
              )}
            &lt;/InfiniteLoader&gt;
          )}
        &lt;/AutoSizer&gt;
      )
    }
  }
  </code></pre>
  
  <p>However, I get the following error : </p>
  
  <pre><code>Uncaught TypeError: this.list.scrollToRow is not a function
  </code></pre>
  
  <p>when I call the <code>scroll_to_week</code> method.</p>
  
  <p>I thought from the documentation <a href="https://github.com/bvaughn/react-virtualized/blob/master/docs/reverseList.md" rel="nofollow noreferrer">https://github.com/bvaughn/react-virtualized/blob/master/docs/reverseList.md</a> that it was the correct way to scroll to a row index.</p>
  
  <p>Thanks for your help.</p>