Text input is autofocussed only when someone just checked the "Other" checkbox :)

This commit is contained in:
Bl00dyMarie
2018-08-15 09:41:05 +02:00
parent a64bfbcd50
commit b3ace768a8
+5 -2
View File
@@ -116,13 +116,16 @@ export default class Sex extends Component {
<CheckBox
value={this.state.other}
onValueChange={(val) => {
this.setState({other: val})
this.setState({
other: val,
focusTextArea: true
})
}}
/>
</View>
{ this.state.other &&
<TextInput
autoFocus={true}
autoFocus={this.state.focusTextArea}
multiline={true}
placeholder="Enter"
value={this.state.note}