title: How to sort column of check box in React Table?
body: <p>I am new to React &amp; I am using react-table and redux to show data in Tabular format. Here, first column(say &quot;Process&quot;) is to show check boxes for records on the basis of business conditions. Every record does not have this check box. I want to implement a feature where if I double click column header of &quot;Process&quot;, records having such check boxes should appear first followed by records not having those check boxes.</p>
  <p>while Rendering, inside ReactTable tag, I have onSortedChange as-</p>
  <pre><code> &lt;ReactTable
      onSortedChange={sort =&gt; this.setState({ sort })}
      ......
   /&gt;
  </code></pre>
  <p>Also, in a function where I am defining all column's structures, Structure of this check box column is like-</p>
  <pre><code> const cols = [{
      id: &quot;checkbox&quot;,
      fixed: true,
      cell: element =&gt; { 
        return (
          &lt;div&gt;
           {&lt;input
              type=&quot;checkbox&quot;
              className=&quot;checkbox&quot;
              value={element.index}
              id={`process-${element.index}`}
              name={`process-${element.index}`}
              onChange={..... change events .....}
              checked={ ........ checked conditions ......}
            /&gt;}
          &lt;/div&gt;
        );
      },
      Header: title =&gt; {
        return (
          &lt;div&gt;
             &lt;input
              type=&quot;checkbox&quot;
              className=&quot;checkbox&quot;
              ref={inp =&gt; {
                if (inp) {
                 inp.indeterminate = Object.keys(....).length &gt; 0;
                }
              }}
              onChange={..... change events .....}
              checked={ ........ checked conditions ......}
             /&gt; 
             &lt;label&gt; Process &lt;/label&gt;
          &lt;/div&gt;
        );
      },
      sortable: true
   }]
  </code></pre>
  <p>I know I need to write comparator probably inside Header section here but for checkboxes where value is simplly element.index how can I write comparator to sort checkboxes.</p>