0.1.7 • Published 6 years ago
react-rayr-page v0.1.7
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});
}}
/>