react-pro-mod-pagination

0.1.0 • Public • Published

React Pro Mod Pagination


A Simple And Flexible Pagination For Data Tables. $ npm install react-pro-mod-pagination --save

import ProModPaginate,{getPaginatedData} from 'react-pro-mod-pagination';

getPaginatedData helper.

Use getPaginatedData helper function to get paginated Data.

Pagination

Name Type Description
pageSize Number Required. The total items per page.
DataArray Array Required. Table Data Array.
currentPage Number Required. Current Page margins.
handleChangeCurrentPage Fun function for handling current page.
import ProModPaginate,{getPaginatedData} from './ProModPaginate'

function TestTable() {
  let data=[....]
    ........
 const handlePage=(value)=>{
  setState({currentPage:value})
  let paginatedData=getPaginatedData(data,4,value)
   setState({paginatedData})
 }
  <ProModPaginate  
  currentPage={state.currentPage}
  handleChangeCurrentPage={handlePage}
  pageSize={4} DataArray={data} 
  />
}

Credits

-->Katragadda Sriharsha.

Readme

Keywords

none

Package Sidebar

Install

npm i react-pro-mod-pagination

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

46.6 kB

Total Files

18

Last publish

Collaborators

  • harsha99999