Skip to content

rayrcoder/react-rayr-page

Repository files navigation

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

About

the pagination plugin for react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published