react-step-range-slider
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -88,2 +88,4 @@ (function (global, factory) { | ||
_this.stepUp = _this.stepUp.bind(_this); | ||
_this.stepDown = _this.stepDown.bind(_this); | ||
_this.setInitialState = _this.setInitialState.bind(_this); | ||
@@ -133,3 +135,4 @@ _this.handleChange = _this.handleChange.bind(_this); | ||
if (nextStep <= breakpoints.maxStep) { | ||
this.setState({ currentStep: nextStep }); | ||
var nextValue = breakpoints.getValueForStep(nextStep); | ||
this.setState({ currentStep: nextStep, value: nextValue }); | ||
} | ||
@@ -146,3 +149,4 @@ } | ||
if (nextStep >= breakpoints.minStep) { | ||
this.setState({ currentStep: nextStep }); | ||
var nextValue = breakpoints.getValueForStep(nextStep); | ||
this.setState({ currentStep: nextStep, value: nextValue }); | ||
} | ||
@@ -149,0 +153,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"main": "dist/index.js", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "Robert Gonzales", | ||
@@ -11,2 +11,4 @@ "license": "MIT", | ||
"react", | ||
"reactjs", | ||
"react-component", | ||
"es6", | ||
@@ -13,0 +15,0 @@ "breakpoint", |
@@ -12,2 +12,4 @@ import './StepRangeSlider.css' | ||
super(props) | ||
this.stepUp = this.stepUp.bind(this) | ||
this.stepDown = this.stepDown.bind(this) | ||
this.setInitialState = this.setInitialState.bind(this) | ||
@@ -47,3 +49,4 @@ this.handleChange = this.handleChange.bind(this) | ||
if (nextStep <= breakpoints.maxStep) { | ||
this.setState({ currentStep: nextStep }) | ||
const nextValue = breakpoints.getValueForStep(nextStep) | ||
this.setState({ currentStep: nextStep, value: nextValue }) | ||
} | ||
@@ -56,3 +59,4 @@ } | ||
if (nextStep >= breakpoints.minStep) { | ||
this.setState({ currentStep: nextStep }) | ||
const nextValue = breakpoints.getValueForStep(nextStep) | ||
this.setState({ currentStep: nextStep, value: nextValue }) | ||
} | ||
@@ -59,0 +63,0 @@ } |
35472
937