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

rc-pagination

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-pagination - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

44

lib/Pagination.js

@@ -32,3 +32,3 @@ 'use strict';

['render', '_handleChange', '_changePageSize', '_isValid', '_prev', '_next', '_hasPrev', '_hasNext', '_jumpPrev', '_jumpNext', '_canJumpPrev', '_canJumpNext'].map(function (method) {
['render', '_handleChange', '_simpleChange', '_changePageSize', '_isValid', '_prev', '_next', '_hasPrev', '_hasNext', '_jumpPrev', '_jumpNext', '_canJumpPrev', '_canJumpNext'].map(function (method) {
return _this[method] = _this[method].bind(_this);

@@ -54,2 +54,38 @@ });

if (props.simple) {
return React.createElement(
'ul',
{ className: prefixCls + ' simple' },
React.createElement(
'li',
{ onClick: this._prev, className: (this._hasPrev() ? '' : 'disabled ') + 'prev' },
React.createElement(
'a',
null,
'‹'
)
),
React.createElement(
'div',
{ className: 'simple-pager' },
React.createElement('input', { type: 'text', value: this.state.current, onChange: this._simpleChange }),
React.createElement(
'span',
{ className: 'slash' },
'/'
),
allPages
),
React.createElement(
'li',
{ onClick: this._next, className: (this._hasNext() ? '' : 'disabled ') + 'next' },
React.createElement(
'a',
null,
'›'
)
)
);
}
if (allPages <= 9) {

@@ -74,2 +110,3 @@ for (var i = 1; i <= allPages; i++) {

// TODO: need optimization
if (current <= 5) {

@@ -152,2 +189,7 @@ // do not show first •••

}, {
key: '_simpleChange',
value: function _simpleChange(evt) {
this._handleChange(Number(evt.target.value));
}
}, {
key: '_handleChange',

@@ -154,0 +196,0 @@ value: function _handleChange(page) {

2

package.json
{
"name": "rc-pagination",
"version": "1.0.9",
"version": "1.0.10",
"description": "pagination ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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