Skip to content
Snippets Groups Projects
Commit 02db9c17 authored by Cathrin Senst's avatar Cathrin Senst
Browse files

fix 306 by setting other-note empty as contraception method 'other' is deactivated

parent 9235a57f
No related branches found
No related tags found
No related merge requests found
......@@ -54,8 +54,12 @@ class Sex extends Component {
toggleState = (key) => {
const curr = this.state[key]
this.setState({[key]: !curr})
if (key === 'other' && !curr) {
this.setState({focusTextArea: true})
if (key === 'other'){
if (curr){
this.setState({note: ""})
} else {
this.setState({focusTextArea: true})
}
}
}
......
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