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:
@@ -54,10 +54,14 @@ class Sex extends Component {
|
||||
toggleState = (key) => {
|
||||
const curr = this.state[key]
|
||||
this.setState({[key]: !curr})
|
||||
if (key === 'other' && !curr) {
|
||||
if (key === 'other'){
|
||||
if (curr){
|
||||
this.setState({note: ""})
|
||||
} else {
|
||||
this.setState({focusTextArea: true})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user