My code is:
<Panel>
<BootstrapTable data={this.state.keys} striped hover condensed>
<TableHeaderColumn isKey dataField='id' dataAlign='center'>ID</TableHeaderColumn>
<TableHeaderColumn dataField='key' dataAlign='center'>Key</TableHeaderColumn>
<TableHeaderColumn dataField='key' dataAlign='center'> </TableHeaderColumn>
</BootstrapTable>
</Panel>
This is what it looks like though:
You haven't listed what versions you are using, so it's really difficult to say what the problem is.
First of all I'd make sure you're using the latest versions.
There are however a couple of issues I can see in your code:
isKey
without a value. That should be isKey={true}
dataField=key
twice, but only one column is showing, I can't think of why that should happen (when I tried it showed the same data in two columns):Your data should be in a format similar to:
var this.state.keys = [{
id: 1,
key: 123
}, {
id: 2,
key: 3425
}, {
id: 3,
key: 98765
}, {
id: 4,
key: 56555
}];
Here's a Plunker of it working correctly with the latest version of React and React-Bootstrap-Table:
http://plnkr.co/edit/01OFaXq5X1UtZBW1oZzM?p=preview
As you can see from the Plunker it seems to work correctly with the latest versions.