Merge branch '306-chart-displays-sex-dot-even-if-only-contraceptive-options-are-saved' into 'master'

Chart doesn't display sex dot although contraception method 'other' has been already removed

Closes #306

See merge request bloodyhealth/drip!285
This commit is contained in:
Maria Zadnepryanets
2020-04-25 18:13:13 +00:00
+5 -1
View File
@@ -54,10 +54,14 @@ class Sex extends Component {
toggleState = (key) => { toggleState = (key) => {
const curr = this.state[key] const curr = this.state[key]
this.setState({[key]: !curr}) this.setState({[key]: !curr})
if (key === 'other' && !curr) { if (key === 'other'){
if (curr){
this.setState({note: ""})
} else {
this.setState({focusTextArea: true}) this.setState({focusTextArea: true})
} }
} }
}
render() { render() {
return ( return (