简体   繁体   English

在React JS中的antd表中显示所需的条目数

[英]Showing number of entries needed in antd table in react JS

I am using antd Table( https://ant.design/components/table/ ) in my react project. 我在我的React项目中使用antd Table( https://ant.design/components/table/ )。 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 我从antd导入Table然后使用此代码

<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? 在antd表中可以吗? If so how to do it? 如果可以,该怎么办?

您共享的沙盒的屏幕截图

You can use antd pagination component and can achieve your need like mentioned below 您可以使用antd分页组件,并可以实现您的需求,如下所述

import { Pagination } from 'antd'; 
<Pagination size="small" total={50} showSizeChanger />

and can refer to antd pagination demo and documentation at this link 并可以在此链接上参考antd分页演示和文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM