I am trying to use react-bootstrap table 2 and I would like to do column span.
Here my example,
<BootstrapTable data={this.state.timesheets} >
<TableHeaderColumn row="0" dataField='empid'>Field B</TableHeaderColumn>
<TableHeaderColumn row="0" dataField='tdate'>Field C</TableHeaderColumn>
<TableHeaderColumn row="0" colSpan="2">In</TableHeaderColumn>
<TableHeaderColumn row="1">Time</TableHeaderColumn>
<TableHeaderColumn row="1">Date</TableHeaderColumn>
</BootstrapTable>
I got this error:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
At the first step, this.state.timesheets
would be nothing, so I thought because of this and I added one attribute noDataIndication="Table is Empty"
. but this error is still happening.
Please help.