Skip to content
Snippets Groups Projects
Commit fcde07f2 authored by Sofiya Tepikin's avatar Sofiya Tepikin
Browse files

Merge branch 'fix/invalid-temperature-input' into 'master'

Block invalid input of temperature value

Closes #488

See merge request bloodyhealth/drip!335
parents f1f18e6f 9dee0bd4
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,12 @@ class Temperature extends Component { ...@@ -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 = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment