availity-reactstrap-validation
Advanced tools
Comparing version 2.5.4 to 2.6.0
@@ -0,1 +1,11 @@ | ||
<a name="2.6.0"></a> | ||
# [2.6.0](https://github.com/Availity/availity-reactstrap-validation/compare/2.5.4...2.6.0) (2019-07-16) | ||
### Bug Fixes | ||
* fix step validator for exponent ([a5911d9](https://github.com/Availity/availity-reactstrap-validation/commit/a5911d9)) | ||
<a name="2.5.4"></a> | ||
@@ -2,0 +12,0 @@ ## [2.5.4](https://github.com/Availity/availity-reactstrap-validation/compare/2.5.3...2.5.4) (2019-06-10) |
@@ -108,3 +108,3 @@ 'use strict'; | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, _InputContainer.call.apply(_InputContainer, [this].concat(args))), _this), _this.state = { | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, _InputContainer.call.apply(_InputContainer, [this].concat(args))), _this), _this._isMounted = false, _this.state = { | ||
invalidInputs: {}, | ||
@@ -160,3 +160,3 @@ dirtyInputs: {}, | ||
!_this.state.submitted && _this.setState({ submitted: true }); | ||
!_this.state.submitted && _this._isMounted && _this.setState({ submitted: true }); | ||
@@ -221,3 +221,8 @@ case 15: | ||
AvForm.prototype.componentWillUnmount = function componentWillUnmount() { | ||
this._isMounted = false; | ||
}; | ||
AvForm.prototype.componentWillMount = function componentWillMount() { | ||
this._isMounted = true; | ||
_InputContainer.prototype.componentWillMount.call(this); | ||
@@ -224,0 +229,0 @@ |
@@ -14,6 +14,15 @@ 'use strict'; | ||
function getDecCount(val) { | ||
var valStr = val.toString(); | ||
if (valStr.indexOf('e-') > -1) { | ||
var valArr = valStr.split('e-'); | ||
return parseInt((valArr[0].split('.')[1] || '').length, 10) + parseInt(valArr[1], 10); | ||
} | ||
return (valStr.split('.')[1] || '').length; | ||
} | ||
// http://stackoverflow.com/a/31711034/1873485 | ||
function floatSafeRemainder(val, step) { | ||
var valDecCount = (val.toString().split('.')[1] || '').length; | ||
var stepDecCount = (step.toString().split('.')[1] || '').length; | ||
var valDecCount = getDecCount(val); | ||
var stepDecCount = getDecCount(step); | ||
var decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; | ||
@@ -20,0 +29,0 @@ var valInt = parseInt(val.toFixed(decCount).replace('.', ''), 10); |
{ | ||
"name": "availity-reactstrap-validation", | ||
"version": "2.5.4", | ||
"version": "2.6.0", | ||
"author": "Evan Sharp <evan.sharp@availity.com>", | ||
@@ -5,0 +5,0 @@ "description": "Form validation helpers for reactstrap", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
3669141
22415