0.1.1 • Published 5 years ago

react-pagination-plugin v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

This is a Simple Pagination Library created using React js which returns the page number selected by end-user

Available Features

  1. Total number of pages
  2. Next Page & Previos Page Buttons
  3. Jump to First Page & Jump to Last Page Buttons
  4. Page Prompter

How to Install

Install react-pagination with npm:

npm i react-paginaion

How to use

Users can use import statement to import the Package -

import Pagination from 'react-paginaion'

class App extends Component {

constructor(props) { super(props); this.state = { activePage: 15 }; }

handlePageUpdate(e){ console.log(e); this.setState({activePage:e}); }

render() {

return (
  <div>
      <Pagination 
        total={20}  
        nextBackPair={true} 
        initialFinalPair={true} 
        onPageChange={this.handlePageUpdate} 
        pagePrompter={true}/>
  </div>
);

} }

Props

NameTypeDefaultDescription
totalNumber15Required Total count of items which you are going to display
nextBackPairBooleanfalseTo show/hide buttons for navigating through pages
initialFinalPairBooleanfalseTo show/hide buttons to jump directly to first and last page
pagePrompterBooleanfalseTo show/hide ... which prompt any upcoming hidden pages in both directions

Keywords

react pagination react-pagination paginator pagination-library-react