How can I access sub object in react-bootstrap-table
I am trying to use react-bootstrap-table in my project. My data object looks something like below-
const features = [
{
id:1,
name:'Name 1',
manufacturer: {
id:1,
name:'Vendor 1',
type:'Type 1'
}
},
{
id:2,
name:'Name 2',
manufacturer: {
id:9,
name:'Vendor 9',
type:'Type 1'
}
},
{
id:3,
name:'Name 3',
manufacturer: {
id:6,
name:'Vendor 6',
type:'Type 3'
}
}
]
When I try to access property {manufacturer.name} in my table data field, it doesn't show anything on the screen.
<BootstrapTable data={features} striped hover condensed>
<TableHeaderColumn dataField={item.id} isKey>ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>NAME</TableHeaderColumn>
<TableHeaderColumn dataField={manufacturere.name}>MANUFACTURER</TableHeaderColumn>
</BootstrapTable>