Socket
Socket
Sign inDemoInstall

rc-pagination

Package Overview
Dependencies
Maintainers
9
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 2.2.1 to 2.2.2

46

es/Options.js

@@ -106,2 +106,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

}, {
key: "getPageSizeOptions",
value: function getPageSizeOptions() {
var _this$props2 = this.props,
pageSize = _this$props2.pageSize,
pageSizeOptions = _this$props2.pageSizeOptions;
if (pageSizeOptions.some(function (option) {
return option.toString() === pageSize.toString();
})) {
return pageSizeOptions;
}
return pageSizeOptions.concat([pageSize.toString()]).sort(function (a, b) {
// eslint-disable-next-line no-restricted-globals
var numberA = isNaN(Number(a)) ? 0 : Number(a); // eslint-disable-next-line no-restricted-globals
var numberB = isNaN(Number(b)) ? 0 : Number(b);
return numberA - numberB;
});
}
}, {
key: "render",

@@ -111,14 +132,13 @@ value: function render() {

var _this$props2 = this.props,
pageSize = _this$props2.pageSize,
pageSizeOptions = _this$props2.pageSizeOptions,
locale = _this$props2.locale,
rootPrefixCls = _this$props2.rootPrefixCls,
changeSize = _this$props2.changeSize,
quickGo = _this$props2.quickGo,
goButton = _this$props2.goButton,
selectComponentClass = _this$props2.selectComponentClass,
buildOptionText = _this$props2.buildOptionText,
selectPrefixCls = _this$props2.selectPrefixCls,
disabled = _this$props2.disabled;
var _this$props3 = this.props,
pageSize = _this$props3.pageSize,
locale = _this$props3.locale,
rootPrefixCls = _this$props3.rootPrefixCls,
changeSize = _this$props3.changeSize,
quickGo = _this$props3.quickGo,
goButton = _this$props3.goButton,
selectComponentClass = _this$props3.selectComponentClass,
buildOptionText = _this$props3.buildOptionText,
selectPrefixCls = _this$props3.selectPrefixCls,
disabled = _this$props3.disabled;
var goInputText = this.state.goInputText;

@@ -135,2 +155,4 @@ var prefixCls = "".concat(rootPrefixCls, "-options");

var pageSizeOptions = this.getPageSizeOptions();
if (changeSize && Select) {

@@ -137,0 +159,0 @@ var options = pageSizeOptions.map(function (opt, i) {

@@ -115,2 +115,23 @@ "use strict";

}, {
key: "getPageSizeOptions",
value: function getPageSizeOptions() {
var _this$props2 = this.props,
pageSize = _this$props2.pageSize,
pageSizeOptions = _this$props2.pageSizeOptions;
if (pageSizeOptions.some(function (option) {
return option.toString() === pageSize.toString();
})) {
return pageSizeOptions;
}
return pageSizeOptions.concat([pageSize.toString()]).sort(function (a, b) {
// eslint-disable-next-line no-restricted-globals
var numberA = isNaN(Number(a)) ? 0 : Number(a); // eslint-disable-next-line no-restricted-globals
var numberB = isNaN(Number(b)) ? 0 : Number(b);
return numberA - numberB;
});
}
}, {
key: "render",

@@ -120,14 +141,13 @@ value: function render() {

var _this$props2 = this.props,
pageSize = _this$props2.pageSize,
pageSizeOptions = _this$props2.pageSizeOptions,
locale = _this$props2.locale,
rootPrefixCls = _this$props2.rootPrefixCls,
changeSize = _this$props2.changeSize,
quickGo = _this$props2.quickGo,
goButton = _this$props2.goButton,
selectComponentClass = _this$props2.selectComponentClass,
buildOptionText = _this$props2.buildOptionText,
selectPrefixCls = _this$props2.selectPrefixCls,
disabled = _this$props2.disabled;
var _this$props3 = this.props,
pageSize = _this$props3.pageSize,
locale = _this$props3.locale,
rootPrefixCls = _this$props3.rootPrefixCls,
changeSize = _this$props3.changeSize,
quickGo = _this$props3.quickGo,
goButton = _this$props3.goButton,
selectComponentClass = _this$props3.selectComponentClass,
buildOptionText = _this$props3.buildOptionText,
selectPrefixCls = _this$props3.selectPrefixCls,
disabled = _this$props3.disabled;
var goInputText = this.state.goInputText;

@@ -144,2 +164,4 @@ var prefixCls = "".concat(rootPrefixCls, "-options");

var pageSizeOptions = this.getPageSizeOptions();
if (changeSize && Select) {

@@ -146,0 +168,0 @@ var options = pageSizeOptions.map(function (opt, i) {

{
"name": "rc-pagination",
"version": "2.2.1",
"version": "2.2.2",
"description": "pagination ui component for react",

@@ -58,3 +58,3 @@ "keywords": [

"enzyme-to-json": "^3.4.0",
"eslint": "^6.6.0",
"eslint": "^7.0.0",
"father": "^2.13.4",

@@ -61,0 +61,0 @@ "husky": "^4.2.3",

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