title: ReactJS Bind Data from Rest API to table
body: <p>I am calling my rest endpoint to fetch data, which I can see is successfully being fetched and stored in the state. However the table is not displaying any data. Ideally I want it to work so that when the state is changed the table automatically refreshes.</p>
  
  <pre><code>import React from 'react';
  import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
  
  const parameterTypes = {
      0: 'STRING',
      1: 'BOOLEAN',
      2: 'INTEGETR',
      3: 'DECIMAL'
  };
  
  const categoryAvailable = {
      0: 'POS'
  };
  
  const options = {
      noDataText: 'No parameters founds.'
  }
  
  function enumFormatter(cell, row, enumObject) {
      return enumObject[cell];
  }
  
  export default class ParameterContainer extends React.Component {
  
      constructor() {
          super();
          this.state = { parameters: [] };
      }
  
      componentDidMount() {
          fetch('/api/parameters')
              .then(result =&gt; result.json())
              .then(params =&gt; {
                  console.log(params);
                  this.state.parameters = params;
                  console.log(this.state);
              })
      }
  
      render() {
          return (
              &lt;div&gt;
                  &lt;h2&gt;Parameters&lt;/h2&gt;
                  &lt;BootstrapTable data={this.state.parameters} options={options}&gt;
                      &lt;TableHeaderColumn isKey dataField='id'&gt;ID&lt;/TableHeaderColumn&gt;
                      &lt;TableHeaderColumn dataField='category' filterFormatted dataFormat={enumFormatter}
                                          formatExtraData={categoryAvailable} filter={{ type: 'SelectFilter', options: categoryAvailable }}&gt;Category&lt;/TableHeaderColumn&gt;
                      &lt;TableHeaderColumn dataField='subCategory'&gt;Sub Category&lt;/TableHeaderColumn&gt;
                      &lt;TableHeaderColumn dataField='parameter'&gt;Parameter&lt;/TableHeaderColumn&gt;
                      &lt;TableHeaderColumn dataField='type' filterFormatted dataFormat={ enumFormatter }
                                         formatExtraData={parameterTypes} filter={{ type: 'SelectFilter', options: parameterTypes}}&gt;Type&lt;/TableHeaderColumn&gt;
                      &lt;TableHeaderColumn dataField='roles'&gt;Roles&lt;/TableHeaderColumn&gt;
                  &lt;/BootstrapTable&gt;
              &lt;/div&gt;
          )
      }
  }
  </code></pre>