fix 306 by setting other-note empty as contraception method 'other' is deactivated
This commit is contained in:
@@ -54,8 +54,12 @@ 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'){
|
||||||
this.setState({focusTextArea: true})
|
if (curr){
|
||||||
|
this.setState({note: ""})
|
||||||
|
} else {
|
||||||
|
this.setState({focusTextArea: true})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user