title: react-table 'pivotBy' - how can I show pivot if there is more than one aggregated item?
body: <p>I'd only to show a different row for aggregated data in react-table that only has one aggregated child element. This is as I have different kinds of data, some of which need to be grouped under a 'parent', others which don't.</p>
  
  <p>Below is an example of the data:</p>
  
  <pre><code>data: [
    {
      type: 'multiple',
      id: 1,
      name: parent report 1,
      parentId: 0
    },
    {
      type: 'multiple',
      id: 2,
      name: child report 1,
      parentId: 1
    }
    {
      type: 'multiple',
      id: 3,
      name: child report 2,
      parentId: 1
    },
    {
      type: 'single', 
      id: 3,
      name: single report
      parentId: 0
    },
    {
      type: 'single'
      id: 3,
      name: another single report
      parentId: 0
    }
  ]
  </code></pre>
  
  <p>I have react-table set up with standard columns, but the problem is that I'm not sure how to group the data, so I don't know which options to provide.</p>
  
  <p>Ideally I would like to have single reports on their own row, and reports that have a parent to be grouped (using the 'pivotBy' property?) under the parent, which could be expanded. The data from the parent doesn't necessarily need to be shown. Below is an example of my current set up.</p>
  
  <p>the columns:</p>
  
  <pre><code>const columns = [
    {
      Header: 'type',
      accessor: 'type'
      Aggregated: row =&gt; &lt;span&gt; { row.value }&lt;/span&gt;
    },
    {
      Header: 'name',
      accessor: 'name,
      aggregate: (values, rows) =&gt; values[0],
      Aggregated: row =&gt; &lt;span&gt; { row.value } &lt;/span&gt;
    },
    {
      Header: 'id',
      accessor: 'id,
      aggregate: (values, rows) =&gt; values[0],
      Aggregated: row =&gt; &lt;span&gt; { row.value } &lt;/span&gt;
    },
    {
      Header: 'parentId',
      accessor: 'parentId,
      aggregate: (values, rows) =&gt; values[0],
      Aggregated: row =&gt; &lt;span&gt; { row.value } &lt;/span&gt;
    }
  ]
  </code></pre>
  
  <p>and the return statement:</p>
  
  <pre><code>  return (
      &lt;ReactTable
        data={data}
        columns={columns}
        pivotBy={['parentId']}
      &gt;
      &lt;/ReactTable&gt;
    )
  </code></pre>
  
  <p>obviously this won't achieve what I'm looking for, so I was wondering if this was possible with react-table.</p>
  
  <hr>
  
  <p>another way of asking this is if it's possible to not aggregate rows that only have one instance of a child in react-table - to instead show the single row.</p>