0.6.1 • Published 7 years ago

@trendmicro/react-paginations v0.6.1

Weekly downloads
469
License
MIT
Repository
github
Last release
7 years ago

react-paginations build status Coverage Status

NPM

React Paginations

Demo: https://trendmicro-frontend.github.io/react-paginations

Installation

  1. Install the latest version of react and react-paginations:

    npm install --save react @trendmicro/react-paginations
  2. At this point you can import @trendmicro/react-paginations and its styles in your application as follows:

    import { TablePagination } from '@trendmicro/react-paginations';
    
    // Be sure to include styles at some point, probably during your bootstraping
    import '@trendmicro/react-paginations/dist/react-paginations.css';

Usage

TablePagination

<TablePagination
    type="full"
    page={this.state.page}
    pageLength={this.state.pageLength}
    totalRecords={this.state.totalRecords}
    onPageChange={({ page, pageLength }) => {
        this.setState({ page, pageLength })
    }}
    prevPageRenderer={() => <i className="fa fa-angle-left" />}
    nextPageRenderer={() => <i className="fa fa-angle-right" />}
/>

API

Properties

TablePagination

NameTypeDefaultDescription
typeString'full''full', 'reduced', or 'minor'
pageNumber1
pageLengthNumber10
pageLengthMenuArray10, 25, 50, 100
dropupBooleanfalseThe menu will open above the dropdown toggle, instead of below it.
totalRecordsNumber0
onPageChangeFunction
prevPageRendererFunction
nextPageRendererFunction
pageRecordsRendererFunction({ totalRecords, from, to })
pageLengthRendererFunction({ pageLength })

License

MIT

0.6.1

7 years ago

0.6.0

7 years ago

0.5.13

7 years ago

0.5.12

7 years ago

0.5.11

7 years ago

0.5.10

7 years ago

0.5.9

7 years ago

0.5.8

7 years ago

0.5.7

7 years ago

0.5.6

7 years ago

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago