【发布时间】:2017-11-24 12:47:35
【问题描述】:
我有一个这样的分页表:
但是如你所见,索引从第二页的0开始;它应该继续在11 继续。
这是代码;
const tableDevices = this.state.pageOfDevices.map((device, index) => {
return <TableRow key={device.id} selected={this.isSelected(index)}>
<TableRowColumn>{index+1}</TableRowColumn>
<TableRowColumn>{device.id}</TableRowColumn>
<TableRowColumn>{device.description}</TableRowColumn>
</TableRow>
});
那么我怎样才能实现跟踪所有项目的索引而不是从另一个页面上的0开始呢?
【问题讨论】:
标签: javascript reactjs pagination