react-native-simple-stepper
Advanced tools
Comparing version 2.1.1 to 2.1.2
{ | ||
"name": "react-native-simple-stepper", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "A super simple react-native implementation of the UIStepper from iOS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -76,5 +76,5 @@ import React, { Component } from 'react'; | ||
componentWillReceiveProps(nextProps) { | ||
const { initialValue, stepValue, minimumValue, maximumValue, disabled } = this.props; | ||
const { value, initialValue, stepValue, minimumValue, maximumValue, disabled } = this.props; | ||
if (nextProps.initialValue !== initialValue) { | ||
this.validateValue(nextProps.initialValue, nextProps, true); | ||
this.validateValue(nextProps.initialValue, nextProps, nextProps.value !== nextProps.initialValue); | ||
} else if (nextProps.disabled !== disabled || nextProps.stepValue !== stepValue) { | ||
@@ -88,2 +88,4 @@ this.validateValue(nextProps.value, nextProps); | ||
} | ||
} else if (nextProps.value !== value) { | ||
this.validateValue(nextProps.value, nextProps); | ||
} | ||
@@ -106,3 +108,3 @@ } | ||
switch (true) { | ||
case wraps: | ||
case wraps: | ||
hasReachedMin = false; | ||
@@ -109,0 +111,0 @@ hasReachedMax = false; |
282282
296