react-slider
Advanced tools
Comparing version 0.11.0 to 0.11.1
{ | ||
"name": "react-slider", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Slider component for React", | ||
@@ -5,0 +5,0 @@ "main": "react-slider.js", |
@@ -280,4 +280,4 @@ (function (root, factory) { | ||
_resize: function () { | ||
var slider = this.refs.slider; | ||
var handle = this.refs.handle0; | ||
var slider = this.slider; | ||
var handle = this.handle0; | ||
var rect = slider.getBoundingClientRect(); | ||
@@ -481,3 +481,3 @@ | ||
var activeEl = document.activeElement; | ||
var handleRef = this.refs['handle' + i]; | ||
var handleRef = this['handle' + i]; | ||
// if activeElement is body window will lost focus in IE9 | ||
@@ -496,7 +496,9 @@ if (activeEl && activeEl != document.body && activeEl != handleRef) { | ||
this.setState({ | ||
startValue: this.state.value[i], | ||
startPosition: position, | ||
index: i, | ||
zIndices: zIndices | ||
this.setState(function (prevState) { | ||
return { | ||
startValue: this.state.value[i], | ||
startPosition: position !== undefined ? position : prevState.startPosition, | ||
index: i, | ||
zIndices: zIndices | ||
}; | ||
}); | ||
@@ -747,3 +749,3 @@ }, | ||
React.createElement('div', { | ||
ref: 'handle' + i, | ||
ref: r => (this['handle' + i] = r), | ||
key: 'handle' + i, | ||
@@ -794,3 +796,3 @@ className: className, | ||
key: 'bar' + i, | ||
ref: 'bar' + i, | ||
ref: r => (this['bar' + i] = r), | ||
className: this.props.barClassName + ' ' + this.props.barClassName + '-' + i, | ||
@@ -864,3 +866,3 @@ style: this._buildBarStyle(offsetFrom, this.state.upperBound - offsetTo) | ||
React.createElement('div', { | ||
ref: 'slider', | ||
ref: r => (this.slider = r), | ||
style: {position: 'relative'}, | ||
@@ -867,0 +869,0 @@ className: props.className + (props.disabled ? ' disabled' : ''), |
@@ -7,6 +7,2 @@ # React Slider | ||
### Important Note | ||
This is an alpha release. Use with caution and hope. | ||
### Installation | ||
@@ -13,0 +9,0 @@ |
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
37519
5
732
164