From 97528e62c77e2229041020ca60583c56de40a3f5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 3 Feb 2016 19:01:23 +0000 Subject: [PATCH] Fix autoshow of modal --- app/components/routes/login.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/components/routes/login.js b/app/components/routes/login.js index 6f0a537..435cbb8 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -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 { this.updateState('token', token)} + onChangeText={this.textChanged} value={this.state.token} onSubmitEditing={this.validate} placeholder="CircleCI Token"