当前位置:网站首页>The table of antd hides the pager when there is only one page
The table of antd hides the pager when there is only one page
2022-07-29 04:03:00 【Boiled water】
Baidu found it hard to find , So write for the benefit of future generations
The version I use :"react": "17.0.2", "react-dom": "17.0.2","antd": "4.20.6"
The point is to pagination Medium hideOnSinglePage Property set to true, The code is as follows
import React from 'react';
import 'antd/dist/antd.css';
import { Table } from 'antd';
const columns = [
{
title: 'Name',
dataIndex: 'name',
},
{
title: 'Age',
dataIndex: 'age',
}
];
const data = [
{
key: '1',
name: 'John Brown',
age: 32
}
];
const paginationProps = {
hideOnSinglePage: true
}
const ScorelistA = () => (
<div>
<Table columns={columns} dataSource={data} size="small" pagination={paginationProps}/>
</div>
);
export default ScorelistA;
边栏推荐
- Wechat applet monitors sliding events on the screen
- The return value of the function is the attention of the pointer, the local variables inside the static limit sub function, and how the pointer to the array represents the array elements
- When array is used as a function parameter, it is better to use the array size as a function parameter
- Since 2019, you must have stopped using this marketing strategy
- Opensql quick learning
- 数据挖掘——关联分析基础介绍(上)
- MySQL Part 4 (end)
- Value transmission and address transmission of C language, pointer of pointer
- EMD empirical mode decomposition
- String template of ES6 new features and methods to simplify objects and functions
猜你喜欢
LVS+KeepAlived高可用部署实战应用
EMD 经验模态分解
LDP -- label distribution protocol
VScode连接ssh遇到的问题
从2019 年开始,你一定停止使用了这个营销策略…
初识C语言(3)
Lvs+keepalived high availability deployment practical application
Simple cases of inner connection and left connection
[principle] several ways of horizontal penetration
3. Solve pychart's error unresolved reference 'selenium' unresolved reference 'webdriver‘
随机推荐
安装ros的laser_scan_matche库所遇到的问题(一)
Typescript from getting started to mastering (19) enumeration types
Summary on the thought of double pointer
路西法98-生活记录ing
Data mining -- code implementation of association analysis example (Part 2)
路由 知识
After I get the winfrom specific control ID from the database, I need to find the corresponding control through this ID and assign a value to the text text of the control. What should I do
Safari's compatibility with Z-index
关于ALV格式控制部分的写法
The function parameters of the new features of ES6 are assigned initial values and rest parameters
LVS+KeepAlived高可用部署实战应用
C language to achieve three chess game (detailed explanation)
Shopify seller: EDM marketing should be combined with salesmartly to easily get the conversion rate
With more than 5 years of work experience and a salary of 15K, would you accept it if you were me?
从2019 年开始,你一定停止使用了这个营销策略…
The const keyword of ES6 declares variables
SQL语句 关于字段转换怎么写
【深度学习CPU(番外篇)——虚拟内存】
[introduction to C language] zzulioj 1031-1035
I. creation and constraint of MySQL table