Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@doctolib/react-paginator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doctolib/react-paginator

Basic paginator component for React.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

react-paginator

Build Status Coverage Status Dependency Status devDependency Status

Basic paginator component for React. This component is designed to use with Bootstrap but you can use it with your own style.

Install

npm install @doctolib/react-paginator

Examples

Usage

class MyComponent extends React.Component {
  getInitialState() {
    return {page: 1};
  },

  onPageChange(page) {
    this.setState({page});
  },

  render() {
    return (
      <Paginator
        nbRowsPerPage={20}
        onPageChange={this.onPageChange}
        page={this.state.page}
        total={200}
      />
    );
  }
}

Properties

condensed

Display a condensed version of the paginator.

<Paginator
  condensed
  nbRowsPerPage={20}
  page={1}
  total={200}
/>
size

You can specify the size to display the paginator, values accepted are small, medium, large. Default is medium.

<Paginator
  nbRowsPerPage={20}
  page={1}
  size="small"
  total={200}
/>
showInfos

Display additionnal informations next to paginator (ex: 181-200 / 300).

<Paginator
  nbRowsPerPage={20}
  page={1}
  showInfos
  total={200}
/>
labels

You can use custom labels for the paginator:

<Paginator
  breakLabel="..."
  firstAriaLabel="Premier"
  firstLabel="<<"
  lastAriaLabel="Dernier"
  lastLabel=">>"
  nbRowsPerPage={20}
  nextAriaLabel="Suivant"
  nextLabel=">"
  page={1}
  previousAriaLabel="Précédent"
  previousLabel="<"
  total={300}
/>
disabled

The paginator can be displayed in disabled mode.

<Paginator
  disabled
  nbRowsPerPage={20}
  page={1}
  total={200}
/>

License

MIT

Keywords

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc