I am using antd Table( https://ant.design/components/table/ ) in my react project. I want to show the number of entries for the table like the below picture.
I am importing Table
from antd
Then using this code
<Table
className="table-layout"
columns={this.state.columns}
dataSource={filteredData}
bordered={true}
size={"small"}
onRowDoubleClick={ (record, index, event) => this.handleEditModal(record) }
onRowClick={(record, index, event) => this.handleRowClick(record)}
loading={this.state.loading}
pagination={{ pageSize: 14 }}
rowClassName={(record) => this.state.selectedItemKey == record.key ? 'table-layout selected' : record.IsDefaultAccount ? 'table-layout active' : 'table-layout' }
/>
Is is possible in antd table? If so how to do it?
You can use antd pagination component and can achieve your need like mentioned below
import { Pagination } from 'antd';
<Pagination size="small" total={50} showSizeChanger />
and can refer to antd pagination demo and documentation at this link
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.