Fix autoshow of modal
This commit is contained in:
parent
f648c9d093
commit
97528e62c7
1 changed files with 6 additions and 7 deletions
|
@ -61,7 +61,8 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
helpText: {
|
||||
fontSize: 11,
|
||||
fontStyle: 'italic'
|
||||
fontStyle: 'italic',
|
||||
padding: 5,
|
||||
},
|
||||
text: {
|
||||
color: 'white'
|
||||
|
@ -76,15 +77,13 @@ export default class Login extends React.Component {
|
|||
showTokenHelp: false
|
||||
};
|
||||
this.validate = this.validate.bind(this);
|
||||
this.updateState = this.updateState.bind(this);
|
||||
this.textChanged = this.textChanged.bind(this);
|
||||
this.showTokenHelp = this.showTokenHelp.bind(this);
|
||||
this.hideTokenHelp = this.hideTokenHelp.bind(this);
|
||||
}
|
||||
|
||||
updateState(key, value) {
|
||||
let state = this.state;
|
||||
state[key] = value;
|
||||
this.setState(state);
|
||||
textChanged(token) {
|
||||
this.setState({ token });
|
||||
}
|
||||
|
||||
validate() {
|
||||
|
@ -127,7 +126,7 @@ export default class Login extends React.Component {
|
|||
</Text>
|
||||
<TextInput
|
||||
style={[styles.input, styles.text]}
|
||||
onChangeText={(token) => this.updateState('token', token)}
|
||||
onChangeText={this.textChanged}
|
||||
value={this.state.token}
|
||||
onSubmitEditing={this.validate}
|
||||
placeholder="CircleCI Token"
|
||||
|
|
Reference in a new issue