title: How to set a default sorting in a react table?
body: <p>I am trying to make a default sorting in for all columns in <code>react-table v7</code> and show only ascending and descending, I've tried the following</p>
  <pre><code>useTable(
      {
        columns,
        data,
        initialState: {
          sortBy: [
            columns.map((one) =&gt; {
              return {
                id: one.accessor ? one.accessor : one.id,
                desc: true,
              };
            }),
          ],
  )
  </code></pre>
  <p>This does change order by default in table, but sorting icons don't appear on columns which I wrote like this</p>
  <pre><code>                 {column.isSorted ? (
                          column.isSortedDesc ? (
                            &lt;ExpandLessIcon
                              fontSize=&quot;large&quot;
                              style={{
                                transition: &quot;250ms transform&quot;,
                                marginLeft: &quot;7px&quot;,
                                fontSize: &quot;20px&quot;,
                              }}
                              color=&quot;disabled&quot;
                            &gt;&lt;/ExpandLessIcon&gt;
                          ) : (
                            &lt;ExpandMoreIcon
                              fontSize=&quot;large&quot;
                              style={{
                                transition: &quot;250ms transform&quot;,
                                marginLeft: &quot;7px&quot;,
                                fontSize: &quot;20px&quot;,
                              }}
                              color=&quot;disabled&quot;
                            &gt;&lt;/ExpandMoreIcon&gt;
                          )
                        ) : (
                          &quot;&quot;
                        )}
  </code></pre>
  <p>and <code>column.isSorted</code> is still <code>false</code> when I console log.
  Can someone help me out with this issue ?</p>