react-rayr-page

0.1.7 • Public • Published

Description

the pagination plugin for react.

    1.support jumping to a page where you want to (when the number of pages is more than 5)

    2.can change the counts that each page show

Install

npm install react-rayr-page --save

Params

param type descript default
count Number the sum of data (required) null
currentPage Number current page 1
perPage Number the counts that each page shows 10
onChange Function callback, the param is the page which you have clicked

Use Demo

import {RayrPage} from 'react-rayr-page';

<RayrPage count={this.state.count}
   currentPage={this.state.currentPage}
   perPage={this.state.perPage}
   onChange={(page) => {
       this.setState({currentPage:page});
   }}
/>

   tips:don`t forget to import the css file

Package Sidebar

Install

npm i react-rayr-page

Weekly Downloads

22

Version

0.1.7

License

MIT

Unpacked Size

36.4 kB

Total Files

17

Last publish

Collaborators

  • hongfeng
  • hope_kelvin
  • jbw0502
  • jehol
  • sherry5636
  • sundongdong