title: React table dynamic page size but with size limit and pagination
body: <p>I am using React Table and i need to set the table rows dynamically depending on the length of my data. this is what i got:</p>
  
  <pre><code>let pgSize = (data.length &gt; 10) ? 5 : data.length;
  
  
  &lt;ReactTable
      data={data} 
      PaginationComponent={Pagination}
      columns={[
          {
              columns: [
              //column defs
              ]
          }
      ]}
      defaultPageSize={10}
      pageSize={pgSize}
      className="-striped -highlight"
  /&gt;
  </code></pre>
  
  <p>i need the rows to be dynamic but if i set the pagesize to the  length of the data. the pagination gets removed and this would be a problem if i have 100 rows of data. i need a maximum of 10 as the default page size. i cant seem to get the logic of doing this. </p>
  
  <p>Thanks for the help!</p>