title: How to initially auto-expand all rows with react-table 7?
body: <p>I'm looking for an easy and clean way to make all rows to be auto-expanded when using react-table v7.</p>
  <p>When I map all the data to <code>true</code> and set it as an initial state, it does not expand my rows.</p>
  <pre><code>const expanded = {
    1: true,
    2: true,
    ...
  };
  
  ...
  
  useTable(
    {
      ...
      initialState: {
        expanded
      }
    }
  );
  </code></pre>
  <p>By dumping table state <code>expanded</code> prop, I've found out there are generated non-numeric keys like <code>{Col1:somevalue2: true}</code> (grouped columns). I don't have an access to those keys before table instance is created and therefore I also don't have an access to row ids in order to generate initial state.</p>
  <p>The only way I've found is below but I'd prefer the tableInstance to be expanded initially (as a result of <code>useTable()</code> hook).</p>
  <pre><code>React.useEffect(() =&gt; tableInstance.toggleAllRowsExpanded(true), []);
  </code></pre>
  <p>Relevant Github FR discussion: <a href="https://github.com/tannerlinsley/react-table/discussions/3317" rel="nofollow noreferrer">https://github.com/tannerlinsley/react-table/discussions/3317</a></p>