【发布时间】:2017-03-28 05:33:47
【问题描述】:
我正在为可反应的表格创建分页。添加分页功能在文档中明确说明,使用itemsPerPage 和pageButtonLimit:
<Table className="table" data={[
{ Name: 'Griffin Smith', Age: '18' },
{ Age: '23', Name: 'Lee Salminen' },
{ Age: '28', Position: 'Developer' },
{ Name: 'Griffin Smith', Age: '18' },
{ Age: '30', Name: 'Test Person' },
{ Name: 'Another Test', Age: '26', Position: 'Developer' },
{ Name: 'Third Test', Age: '19', Position: 'Salesperson' },
{ Age: '23', Name: 'End of this Page', Position: 'CEO' },
]} itemsPerPage={4} pageButtonLimit={5} />
但是,分页的挑战在于,能够自定义分页容器的外观。我正在使用以下类reactable-pagination 来自定义分页容器。但是,这非常具有挑战性,因为它会影响表格的外观。
我查看了以下 GitHub 问题,但它似乎没有解决我的问题。 Make it possible to style pagination
我正在使用 React 和 Sass,所以请不要回复 jQuery DOM 操作答案。
【问题讨论】:
标签: javascript reactjs npm sass