title: How can I delete a button in a cell and replace it with a text/number?
body: <p>I'm preparing a react-table and there is a column of buttons. When clicked, there is another column that updates according to the row number that was clicked.</p>
  <p>I want to remove the separate column to show the data and have it update the column which has the button in it. Therefore once clicked, the data obtained will replace the button in that particular row. How do I do this?</p>
  <p>this is the table format I currently have. So when I click the button, 'API calls in last month' gets updated accordingly.</p>
  <pre><code>{
    Header: 'Click to get API info',
    accessor: 'click-me-button',
    Cell: ({ row }) =&gt; (
      &lt;button onClick={(e) =&gt; this.handleButtonClick(e, row)}&gt;Click Me&lt;/button&gt;
    )
  },{
    Header: 'API calls in last month',
    accessor: 'lastapicalls',
    Cell: row =&gt; &lt;div style={{ textAlign: &quot;center&quot; }}&gt;{row.value}&lt;/div&gt;
  }
  </code></pre>
  <p>I want to remove the column 'API calls in last month' and update 'click-me-button' column with that info obtained by clicking the button (by replacing the clicked button with the obtained data)</p>
  <p>The code for obtaining data for now is as follows</p>
  <pre><code>handleButtonClick(e, rowInfo) {
    axios({   
      method: 'get',
      url: 'http://localhost:8080/info/search/lastapicalls/'+rowInfo.tenant_domain, 
      auth: {
        username: this.state.user,
        password: this.state.pass,
      }
    })
    .then(response =&gt; this.setState({ retrievedapicalls: response.data },
      () =&gt; {
        this.setState(oldState =&gt; {
          let data = oldState.data.slice();
          let copy = Object.assign({}, data[rowInfo._index]);
          copy.lastapicalls = this.state.retrievedapicalls;
          copy.selected = true;
          data[rowInfo._index] = copy;
          return {
            data
          };
        }
      );
    }))
  }
  </code></pre>
  <p>The state 'data' contains the information necessary to fill the table.</p>