[英]type is invalid -- expected a string but got: undefined
I am trying to use react-bootstrap table 2 and I would like to do column span.我正在尝试使用 react-bootstrap table 2,我想做列跨度。
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"
.在第一步,
this.state.timesheets
什么都不是,所以我想正因为如此,我添加了一个属性noDataIndication="Table is Empty"
。 but this error is still happening.但这个错误仍在发生。
Please help.请帮忙。
According to the documentation, TableHeaderColumn
will no longer support in react-bootstrap table 2.根据文档,
TableHeaderColumn
将不再支持 react-bootstrap 表 2。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.