如何解决react bootstrap table 2中没有数据时隐藏空行
我正在使用引导表2。当位置中没有数据时出现问题。它显示了react引导表2中的空行。有人帮助我使用react js解决代码
import React,{ Component } from 'react';
class location extends Component {
constructor(props) {
super(props)
this.state = {
location: [],}
}
render() {
return (
<div className="add-report py-2 n4-top-report">
<div className="mb-0">
<div className="table-title">Location Inventory</div>
</div>
<div className="n4-buttons">
<div>
<Link to="/location/locationaddpage"><button className="add-m-button"><FontAwesomeIcon icon={faPlus} /> Add</button></Link>
</div>
</div>
<BootstrapTable
keyField='Nomovi_LocationId'
data={this.state.location}
columns={locations}
filter={filterFactory()}
filterPosition="top"
pagination={paginationFactory(options)}
/>
</div>
</div>
</div>
</div>
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。