question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table component pagination props

See original GitHub issue

Version

3.1.1

Environment

macOs, node: 8.3.0

Reproduction link

https://github.com/ant-design/ant-design/blob/master/components/table/interface.tsx

Steps to reproduce

  const tableConfig = {
      loading: this.state.loading,
      columns: columns,
      dataSource: data,

      pagination: false,
 }

 return (
     <Table {...tableConfig}/>
 )

What is expected?

hide the table pagination

What is actually happening?

Types of property ‘pagination’ are incompatible. Type ‘boolean’ is not assignable to type ‘false | PaginationProps | undefined’.

image

If I set the pagination: {}, it work fine

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
yesmeckcommented, Jan 15, 2018
import { TableProps } from 'antd/lib/table';

const tableConfig = {
  loading: this.state.loading,
  columns: columns,
  dataSource: data,
  pagination: false,
} as TableProps<any>;

<Table {...tableConfig}/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

TablePagination API - Material UI - MUI
TablePagination API. API reference docs for the React TablePagination component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
Pagination Props · react-bootstrap-table2 - GitHub Pages
Following we list all props for paginationFactory from react-bootstrap-table2-paginator ... Use pagination.page specify the current page when table render.
Read more >
React Table Pagination Example | TanStack Table Docs
An example showing how to implement Pagination in React Table.
Read more >
How to Build a Custom Pagination Component in React
Let's first look at what values we need as props to our Pagination component: totalCount: represents the total count of data available from ......
Read more >
Implementing React table pagination handling one million ...
Once we have pagination hooks, replace the rows prop with page prop inside the useTable hooks because every data inside the table will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found