Text input is autofocussed only when someone just checked the "Other" checkbox :)
This commit is contained in:
@@ -116,13 +116,16 @@ export default class Sex extends Component {
|
|||||||
<CheckBox
|
<CheckBox
|
||||||
value={this.state.other}
|
value={this.state.other}
|
||||||
onValueChange={(val) => {
|
onValueChange={(val) => {
|
||||||
this.setState({other: val})
|
this.setState({
|
||||||
|
other: val,
|
||||||
|
focusTextArea: true
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{ this.state.other &&
|
{ this.state.other &&
|
||||||
<TextInput
|
<TextInput
|
||||||
autoFocus={true}
|
autoFocus={this.state.focusTextArea}
|
||||||
multiline={true}
|
multiline={true}
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
value={this.state.note}
|
value={this.state.note}
|
||||||
|
|||||||
Reference in New Issue
Block a user