Socket
Socket
Sign inDemoInstall

rc-pagination

Package Overview
Dependencies
28
Maintainers
2
Versions
201
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

lib/KeyCode.js

14

lib/Options.js

@@ -15,2 +15,4 @@ 'use strict';

var KEYCODE = require('./KeyCode');
var Options = (function (_React$Component) {

@@ -79,3 +81,3 @@ _inherits(Options, _React$Component);

'跳至',
React.createElement('input', { type: 'text', defaultValue: props.current, onChange: this._quickGo, onKeyUp: this._quickGo }),
React.createElement('input', { type: 'text', defaultValue: props.current, onKeyDown: this._checkValid, onChange: this._quickGo, onKeyUp: this._quickGo }),
'页'

@@ -98,2 +100,12 @@ );

}, {
key: '_checkValid',
value: function _checkValid(evt) {
var keyCode = evt.keyCode;
var valid = keyCode >= KEYCODE.ZERO && keyCode <= KEYCODE.NINE || keyCode >= KEYCODE.NUMPAD_ZERO && keyCode <= KEYCODE.NUMPAD_NINE || keyCode === KEYCODE.DELETE || keyCode === KEYCODE.BACKSPACE || keyCode === KEYCODE.ENTER;
if (!valid) {
evt.preventDefault();
}
}
}, {
key: '_quickGo',

@@ -100,0 +112,0 @@ value: function _quickGo(evt) {

6

lib/Pagination.js

@@ -173,3 +173,5 @@ 'use strict';

selectPrefixCls: props.selectPrefixCls,
changeSize: this.props.showSizeChanger ? this._changePageSize.bind(this) : null, current: this.state.current, quickGo: this.props.showQuickJumper ? this._handleChange.bind(this) : null })
changeSize: this.props.showSizeChanger ? this._changePageSize.bind(this) : null,
current: this.state.current,
quickGo: this.props.showQuickJumper ? this._handleChange.bind(this) : null })
);

@@ -188,3 +190,3 @@ }

value: function _isValid(page) {
return typeof page === 'number'; // && page >= 1 && page <= this._calcPage();
return typeof page === 'number' && page >= 1 && page <= this._calcPage() && page !== this.state.current;
}

@@ -191,0 +193,0 @@ }, {

{
"name": "rc-pagination",
"version": "1.1.4",
"version": "1.1.5",
"description": "pagination ui component for react",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc