title: React-table: save accessor value in state with checkbox
body: <p>I am trying to use the react-table as a checkbox table. The first column will be the checkboxes, when a checkbox gets selected i want to save the id that was defined in the accessor in the state.</p>
  
  <p>I have been looking at the examples and made my way trough the official documentation, so far without much luck.</p>
  
  <p>My code so far:</p>
  
  <pre><code>import React from 'react';
  import ReactTable from "react-table";
  import 'react-table/react-table.css'
  
  export default class TableAccessor extends React.Component {
    constructor(props){
      super(props);
      this.state = { personId: null }
  
       //Data to show inside the table, when an item gets selected the ID has to be set in the state
      this.data= [
        {id: 1, first_name: 'Emma', last_name: 'Smith', email: 'emma@example.com'},
        {id: 2, first_name: 'Liam', last_name: 'Miller', email: 'liam@example.com'}
      ];
  
      //Header data for the table
      this.columns = [
        {Header: '#', accessor: 'id', Cell: () =&gt; &lt;input onChange={() =&gt; {
          //Here i want to get the ID of the selected item defined in this.data
          this.setState({personId: this.data.id});
        }} type="checkbox"&gt;&lt;/input&gt;},
        {Header: 'First name', accessor: 'first_name'},
        {Header: 'Last name', accessor: 'last_name'},
        {Header: 'Email', accessor: 'email'}
      ];
  
    }
  
    logger = () =&gt; {
      console.log("personId: " + this.state.personId)
    }
  
    render() {
      return(
        &lt;div className="wrapper"&gt;
          &lt;button onClick={this.logger}&gt;Print&lt;/button&gt;
          &lt;ReactTable data={this.data} columns={this.columns} /&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>I also want to be able to only check one checkbox at the time. I saw people solving this with radio buttons, however when i change the <code>type="checkbox"</code> to <code>type="radio"</code> i can still select more than one item.</p>
  
  <p>Who can help me overcome this issue and explain me what the best way is to save the accessor value in the state?</p>
  
  <p>Thanks in advance :)</p>