title: React-table events
body: <p>I'm currently using <strong>React-Table</strong> and it's working great.</p>
  
  <p>I want to have a dynamic <strong>pageSize</strong> according to the data filtered in the table.</p>
  
  <pre><code>&lt;ReactTable
      ...
      filtered={[{
               "id": "stage",
               "value": 1
             }]}
  
      getTdProps={(state, rowInfo, column, instance) =&gt; {
          return {
              onClick: () =&gt;
                  this.setState({
                    preliminary:state.sortedData.length
                  })
              };
          }}
      pageSize={this.state.preliminary}
  /&gt;
  </code></pre>
  
  <p>And my state in the constructor</p>
  
  <pre><code>this.state = {
      preliminary: 10
  };
  </code></pre>
  
  <p>This works great when clicking because of the <strong><em><code>onClick()</code></em></strong> event. I want it to fire <strong><em><code>onLoad()</code></em></strong> of the page.
  Changing <strong><em><code>onClick()</code></em></strong> to <strong><em><code>onLoad()</code></em></strong> doesn't do anything.</p>
  
  <p>Any help appreciated!</p>