rc-input-number
Advanced tools
Comparing version 2.5.7 to 2.5.8
@@ -31,2 +31,4 @@ 'use strict'; | ||
onBlur: _react2['default'].PropTypes.func, | ||
max: _react2['default'].PropTypes.number, | ||
min: _react2['default'].PropTypes.number, | ||
step: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]) | ||
@@ -199,5 +201,13 @@ }, | ||
upStep: function upStep(val) { | ||
var stepNum = this.props.step; | ||
var _props4 = this.props; | ||
var step = _props4.step; | ||
var min = _props4.min; | ||
var precisionFactor = this.getPrecisionFactor(); | ||
var result = (precisionFactor * val + precisionFactor * stepNum) / precisionFactor; | ||
var result = undefined; | ||
if (typeof val === 'number') { | ||
result = (precisionFactor * val + precisionFactor * step) / precisionFactor; | ||
} else { | ||
result = min === -Infinity ? step : min; | ||
} | ||
return this.toPrecisionAsStep(result); | ||
@@ -207,5 +217,13 @@ }, | ||
downStep: function downStep(val) { | ||
var stepNum = this.props.step; | ||
var _props5 = this.props; | ||
var step = _props5.step; | ||
var min = _props5.min; | ||
var precisionFactor = this.getPrecisionFactor(); | ||
var result = (precisionFactor * val - precisionFactor * stepNum) / precisionFactor; | ||
var result = undefined; | ||
if (typeof val === 'number') { | ||
result = (precisionFactor * val - precisionFactor * step) / precisionFactor; | ||
} else { | ||
result = min === -Infinity ? -step : min; | ||
} | ||
return this.toPrecisionAsStep(result); | ||
@@ -212,0 +230,0 @@ }, |
{ | ||
"name": "rc-input-number", | ||
"version": "2.5.7", | ||
"version": "2.5.8", | ||
"description": "input-number ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
20092
398