Block invalid input of temperature value
This commit is contained in:
@@ -50,7 +50,12 @@ class Temperature extends Component {
|
||||
}
|
||||
|
||||
onChangeTemperature = (value) => {
|
||||
this.setState({ value, shouldShowSuggestion: false })
|
||||
if (!Number(value)) return false
|
||||
|
||||
this.setState({
|
||||
value: value.trim(),
|
||||
shouldShowSuggestion: false
|
||||
})
|
||||
}
|
||||
|
||||
onShowTimePicker = () => {
|
||||
|
||||
Reference in New Issue
Block a user