React-table: Custom pagination

Created on 10 Oct 2018  路  3Comments  路  Source: tannerlinsley/react-table

I didn't see the ability to control the appearance of the pager. I'm more interested in a Bootstrap-style pager. Eg.

image

Is that something currently do-able with react-table?

Most helpful comment

You can customize the Pagination using Component Overrides, here's a quick example:

<ReactTable
  // ...
  PaginationComponent={Pagination}
/>
class Pagination extends React.Component {
  render = () => (
    <div>
      You are on page {this.props.page + 1} of {this.props.pages}.
    </div>
  );
}

All 3 comments

You can customize the Pagination using Component Overrides, here's a quick example:

<ReactTable
  // ...
  PaginationComponent={Pagination}
/>
class Pagination extends React.Component {
  render = () => (
    <div>
      You are on page {this.props.page + 1} of {this.props.pages}.
    </div>
  );
}

@alexkindel Awesome. Thanks! I'm using Typescript. What is the type of props the Pagination Component uses?

I am passing the customPagination in the same manner as above; but i am facing a warning message of Failed prop type: Invalid prop PaginationComponent supplied to ReactTable.
Any idea what can be the cause

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kieronsutton00 picture kieronsutton00  路  3Comments

dwjft picture dwjft  路  3Comments

pasichnyk picture pasichnyk  路  3Comments

panfiva picture panfiva  路  3Comments

williamolojede picture williamolojede  路  3Comments