1.1.0 • Published 4 years ago

reaco-pagination v1.1.0

Weekly downloads
12
License
ISC
Repository
github
Last release
4 years ago

REACO-PAGINATION

A ReactJS component that creates a pagination.

Reaco-Pagination is written over AdeleD/react-paginate.

Installation

Using npm:

$ npm install --save reaco-pagination

Code example

import React, { Component } from 'react';
import Pagination from 'reaco-pagination';

// finally the component to be render
<Pagination
      forcePage={0}
      total={150} 
      size={10} 
      dataSize={10}
      handlePageChange={this.onPageChange}
      handlePageOptionChange={this.onPageOptionChange} />

See the App.js for complete code example.

Props

NameTypeDescription
totalNumberRequired. The total number of data across the pages.
sizeNumberRequired. The total number of maximum data per page i.e per page count.
dataSizeNumberRequired. The least number of rows per page i.e there may be less items on last page in compare to maximum count per page.
forcePageNumberOptional. This is current page index.
handlePageChangeFunctionOptional. This is the callback function hits on page number's click.
handlePageOptionChangeFunctionOptional. This is the callback function hits on page count option's click.
pageOptionsArrayOptional. This is list of different page counts. ex: 10, 25, 50, 100
pageSummaryTextStringOptional. This is text string of pagination summary. It must contain these words i.e '#first_count#, #last_count#, #total_counts#' to show 'inital count of page, last count of page and total counts of all pages' respectively. ex: 'Showing #first_count# to #last_count# of #total_counts# entries'

See the full Documentation of react-paginate here.

1.1.0

4 years ago

1.0.9

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago