Block invalid input of temperature value
This commit is contained in:
@@ -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