title: Add button in a react-bootstrap-table
body: <p>I'm using react-bootstrap-table (<code>var ReactBsTable = require("react-bootstrap-table")</code>).</p>
  
  <p>I want to add a column that just contain a button in a bootstraptable .</p>
  
  <p>Any idea thanks.</p>
  
  <pre><code>&lt;BootstrapTable data={this.state.activities} pagination={true} hover={true} search={true} selectRow={selectRowProp} options={options}&gt;
    &lt;TableHeaderColumn isKey={true} dataField="id" hidden {true}&gt;ID&lt;/TableHeaderColumn&gt;
    &lt;TableHeaderColumn dataField="title" dataSort={true}&gt;Title&lt;/TableHeaderColumn&gt;
    &lt;TableHeaderColumn dataField="adress" dataSort{true}&gt;Adress&lt;/TableHeaderColumn&gt;
    ///I dont know if here or there is option to use
   &lt;/BootstrapTable&gt;
  </code></pre>
  
  <p>I tried to add a button which display the id or the row data correspondent to this button.
  I used jquery but I give an id to the button but all these buttons would have the same id so just the first one work and the rest no.</p>
  
  <pre><code>&lt;BootstrapTable data={this.state.activities} pagination={true} hover={true} search={true} selectRow={selectRowProp} options={options}&gt;
    &lt;TableHeaderColumn isKey={true} dataField="id" hidden {true}&gt;ID&lt;/TableHeaderColumn&gt;
    &lt;TableHeaderColumn dataField="title" dataSort={true}&gt;Title&lt;/TableHeaderColumn&gt;
    &lt;TableHeaderColumn dataField="adress" dataSort{true}&gt;Adress&lt;/TableHeaderColumn&gt;
    &lt;TableHeaderColumn dataField="button" dataFormat={this.buttonFunction}&gt;&lt;/TableHeaderColumn&gt;
  
   &lt;/BootstrapTable&gt;
  
  buttonFunction: function (cell, row) {
          var today = new Date().toISOString();
          if (row.status === "En cours") {
              if (row.dateEnd &gt; today) {
                  return &lt;Alert_Validate&gt;&lt;/Alert_Validate&gt;;
              } else {
                  return &lt;label&gt;
                      &lt;button type="button" id="validatebutton" onClick={this._validateFunction} className="bbtn btn-primary btn-sm"&gt;&lt;i className="fa fa-check fa-1x" aria-hidden="true"&gt;&lt;/i&gt;
                      &lt;/button&gt;
                  &lt;/label&gt;
  
              }
          }
      },
  
  _validateFunction: function () {
          var userid=this.props.params.id;
          $("#validatebutton").click(function() {
              var $row = $(this).closest("tr");
               var activityid = $row.find("td:nth-child(2)");
              console.log("activity id :"+activityid.text());
          });
  </code></pre>