rc-pagination
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -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) { |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23571
535