Text input is autofocussed only when someone just checked the "Other" checkbox :)
This commit is contained in:
1 parent
a64bfbcd50
commit
b3ace768a8
1 file changed
+5
-2
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user