@atlaskit/field-range
Advanced tools
Comparing version 4.1.0 to 4.1.1
# @atlaskit/field-range | ||
## 4.1.1 | ||
- [patch] update valuePercent state when value property is updated in FieldRange [8228477](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8228477) | ||
- [none] Updated dependencies [8228477](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8228477) | ||
## 4.1.0 | ||
@@ -4,0 +8,0 @@ - [minor] Added elevations to the Theme package and updated visual styles for the field-range component. [dbd8de7](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/dbd8de7) |
@@ -103,4 +103,13 @@ 'use strict'; | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ value: nextProps.value }); | ||
value: function componentWillReceiveProps(_ref) { | ||
var nextValue = _ref.value, | ||
min = _ref.min, | ||
max = _ref.max; | ||
var currentValue = this.props.value; | ||
if (currentValue !== nextValue) { | ||
var _valuePercent = this.getPercentValue(nextValue, min, max); | ||
this.setState({ value: nextValue, valuePercent: _valuePercent }); | ||
} | ||
} | ||
@@ -107,0 +116,0 @@ }, { |
@@ -77,4 +77,13 @@ import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
this.setState({ value: nextProps.value }); | ||
value: function componentWillReceiveProps(_ref) { | ||
var nextValue = _ref.value, | ||
min = _ref.min, | ||
max = _ref.max; | ||
var currentValue = this.props.value; | ||
if (currentValue !== nextValue) { | ||
var _valuePercent = this.getPercentValue(nextValue, min, max); | ||
this.setState({ value: nextValue, valuePercent: _valuePercent }); | ||
} | ||
} | ||
@@ -81,0 +90,0 @@ }, { |
{ | ||
"name": "@atlaskit/field-range", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Component which renders a slider and is a substitute of the native input[range] element", | ||
@@ -37,2 +37,2 @@ "license": "Apache-2.0", | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
54840
432