New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react_bootstrap_paginator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react_bootstrap_paginator

A contextual paginator on top of react and bootstrap

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

reactBootstrapPaginator

A contextual paginator on top of react and bootstrap

Installation

  npm install react_bootstrap_paginator

What do you mean with contextual paginator?

I mean that it's presentation will change according to the context.

If you have the pages 1-10 , are on the first one and want to show 10 pages it will look like this: 1_to_10

Notice no arrow or dots indicating more

On 1-50 and you are on page 30 it would look like this:

1-50

Notice both arrows , dots indicating more pages

And if you are on the last page it will look like this:

end

Notice no right arrow and no right dots

Usage ES5 standalone

I have a codepen example here

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Reacomponents - Paginator ES5</title>
       <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    </head>
    <body>
      <div id="the_paginator"></div>
      <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js"></script>
      <script src="../../build/react-paginator.min.js"></script>
      <script>
        var Paginator = React.createFactory(ReactPaginator);

        window.onload = function () {
          var PaginatorComp = Paginator({
            current: 10,
            total: 1000,
            onPage:function(page){
              console.log("I should do something regarding page "+page);
            }
          });
          var container = document.getElementById('the_paginator');
          var l = ReactDOM.render(PaginatorComp, container);
        };
      </script>
    </body>
    </html>

Usage ES6

  import Paginator from '../../../src/Paginator.jsx';
  import React from 'react';
  import ReactDOM from 'react-dom';
  const App = React.createClass({
          pages:{
               current: 10,
              total: 1000
          },
          pageClick(page){
              console.log("I should do something regarding page "+page);
          },
          render(){
              return(
                 <Paginator current={this.pages.current} total={this.pages.total} max={this.max} onPage={this.pageClick}></Paginator>
              )
          }
  });
  ReactDOM.render(<App/>, document.getElementById('the_paginator'));

Keywords

FAQs

Package last updated on 13 Mar 2016

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