Block invalid input of temperature value
This commit is contained in:
1 parent
f1f18e6f93
commit
9dee0bd443
1 file changed
+6
-1
@@ -50,7 +50,12 @@ class Temperature extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChangeTemperature = (value) => {
|
onChangeTemperature = (value) => {
|
||||||
this.setState({ value, shouldShowSuggestion: false })
|
if (!Number(value)) return false
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
value: value.trim(),
|
||||||
|
shouldShowSuggestion: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowTimePicker = () => {
|
onShowTimePicker = () => {
|
||||||
|
|||||||
Reference in new issue
Block a user