1.1.1 • Published 3 years ago

react-infinite-pagination v1.1.1

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

react-infinite-pagination

NPM version NPM monthly download

A React component to render a infinite pagination(without total page) just like google

By installing this component and using my example.css you can obtain this:

screenshot

Installation

yarn add react-infinite-pagination

Usage(Hooks only)

Example: https://codesandbox.io/s/react-infinite-pagination-example-rx32s

import {Pagination} from 'react-infinite-pagination';
import 'react-infinite-pagination/lib/example.css';

const Datatable = () => {
  return <Pagination current={6} />;
};

Options

NameTypeDescription
pageInVisibleNumberThe number of pages to display. Default: 10
currentNumberThe current page selected. Default: 1
lastPageNumberThe total number of pages. If undefined the pagination will infinite
hideOnSinglePageBooleanWhether to hide pager on single page
wrapClassNameStringThe class name of the container of the pagination. Default: infinite-pagination
itemClassNameStringThe class name of the page item. Default: infinite-pagination-item
onChangeFunction(current: number) => voidThe callback executed when the page number is changed
renderPageItemComponent<{current: number}>The component to render the page item
renderPrevComponent<{current: number}>The component to render the previous button
renderNextComponent<{current: number}>The component to render the next button

License

MIT

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago