title: React Bootstrap Table can't create TableHeaderColumn with map Error. No any key column defined in TableHeaderColumn
body: <p>I get the following error when I try to create <code>TableHeaderColumn</code> programatically using map.</p>
  
  <blockquote>
    <p>Uncaught Error: Error. No any key column defined in TableHeaderColumn.
    Use 'isKey={true}' to specify a unique column after version 0.5.4.</p>
  </blockquote>
  
  <p>If I don't use map and hard code the same values everything works. I usually use map for tables and it usually works as a charm. I have tried with and without <code>key</code> property for map, same error.</p>
  
  <p><a href="https://stackoverflow.com/a/25647392/3850405">https://stackoverflow.com/a/25647392/3850405</a></p>
  
  <p>Does not work:</p>
  
  <pre><code>type TableHeader = {
      dataField: string;
      name: string
      isKey: boolean
  }
  
  const crimeTableHeaders: TableHeader[] = [{
      dataField: 'CrimeCode',
      name: 'Brottskod',
      isKey: true,
  },
  {
      dataField: 'CrimeCodeClearText',
      name: 'Namn',
      isKey: false,
  },
  {
      dataField: 'Count',
      name: 'Antal',
      isKey: false,
  }
  ]
  
  &lt;BootstrapTable containerStyle={{ marginTop: '10px' }} data={this.props.data} options={this.options} striped={true} hover={true} search multiColumnSearch strictSearch&gt;
      {crimeTableHeaders.map((tableHeader, index) =&gt; {
          &lt;TableHeaderColumn key={index} dataField={tableHeader.dataField} isKey={tableHeader.isKey} dataSort={true}&gt;{tableHeader.name}&lt;/TableHeaderColumn&gt;
          /*&lt;TableHeaderColumn dataField={tableHeader.dataField} isKey={tableHeader.isKey} dataSort={true}&gt;{tableHeader.name}&lt;/TableHeaderColumn&gt;*/
      })}
  &lt;/BootstrapTable&gt;
  </code></pre>
  
  <p>Works:</p>
  
  <pre><code>&lt;BootstrapTable containerStyle={{ marginTop: '10px' }} data={this.props.data} options={this.options} striped={true} hover={true} search multiColumnSearch strictSearch&gt;
      &lt;TableHeaderColumn dataField='CrimeCode' isKey={true} dataSort={true}&gt;Brottskod&lt;/TableHeaderColumn&gt;
      &lt;TableHeaderColumn dataField='CrimeCodeClearText' isKey={false} dataSort={true}&gt;Namn&lt;/TableHeaderColumn&gt;
      &lt;TableHeaderColumn dataField='Count' isKey={false} dataSort={true}&gt;Antal&lt;/TableHeaderColumn&gt;
  &lt;/BootstrapTable&gt;
  </code></pre>