title: React with Material UI Table Pagination show all entries
body: <p>I have a react data table where I recently added pagination for when you have many entries. I wanted the option to show all entries in the table by selecting "all" in the rowsPerPageOptions dropdown menu. So far I managed to get the count of all entries to show up in the menu.</p>
  
  <p>What I need now is to label the <code>entries.length</code> object with the string "all" and get that to show up in the menu. Is that possible?</p>
  
  <p>When I try something like <code>all.push({label: this.state.entries.length});</code>  I get the error:</p>
  
  <blockquote>
    <p>Objects are not valid as a React child (found: object with keys {label}). If you meant to render a collection of children, use an array instead.</p>
  </blockquote>
  
  <p>That made me think that I can not use arrays with keys for the menu, so I have to show that value in a different way.</p>
  
  <p>Code: </p>
  
  <p><strong>Edit: Moved the all variable into the render function after morteza ataiy commented and pointed out an error.</strong></p>
  
  <pre><code>render() {
      return (
      let all = [5,10,25,50,(this.state.entries.length)];
          &lt;div&gt;
          &lt;Table&gt;
          &lt;/Table&gt;
          &lt;/div&gt;
          &lt;TablePagination
                  component="div"
                  count={this.state.entries.length}
  
                  rowsPerPage={this.state.rowsPerPage}
                  page={this.state.page}
                  backIconButtonProps={{
                      'aria-label': 'Previous Page',
                  }}
                  nextIconButtonProps={{
                      'aria-label': 'Next Page',
                  }}
                  onChangePage={this.handleChangePage}
                  onChangeRowsPerPage={this.handleChangeRowsPerPage}
                  labelRowsPerPage="Reihen pro Seite:"
                  rowsPerPageOptions={all}
  
              );
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BlZaq.png" rel="noreferrer">Image: The last entry is what I want to change</a></p>
  
  <p>Please keep in mind that I am new to React and JavaScript, thanks in advance!</p>