Components

Pagination

<Pagination totalCount pageSize siblingCount currentPage onPageChange DOTS DOTSClassName pageButtonClassName currentPageClassName previousButtonClassName nextButtonClassName disabledClassName />

Constructor

# <Pagination totalCount pageSize siblingCount currentPage onPageChange DOTS DOTSClassName pageButtonClassName currentPageClassName previousButtonClassName nextButtonClassName disabledClassName />

A pagination component that can be used to navigate through a list of items.

PropTypes:
Name Type Required Description Default
totalCount number Yes The total number of items in the list
pageSize number Yes The number of items to show per page
siblingCount number No The number of pages to show before and after the current page 1
currentPage number Yes The current page number
onPageChange func Yes The function to call when a page is clicked
DOTS string No The string to show in the pagination component when there are more pages than can be shown "..."
DOTSClassName string No The class name to add to the pagination component when there are more pages than can be shown "ellipsis"
pageButtonClassName string No The class name to add to the page buttons "paginate-button"
currentPageClassName string No The class name to add to the current page button "current-page"
previousButtonClassName string No The class name to add to the previous button "paginate-button previous"
nextButtonClassName string No The class name to add to the next button "paginate-button next"
disabledClassName string No The class name to add to the disabled buttons "disabled"

View Source Pagination/index.jsx, line 13

  • The pagination component.
React.Component

Methods

# inner onNext()

Go to the next page.

View Source Pagination/index.jsx, line 96

# inner onPrevious()

Go to the previous page.

View Source Pagination/index.jsx, line 101

# inner range()

Function to generate a range of pages to display

View Source Pagination/index.jsx, line 32

An array of numbers.