Added handling for enter key on select server page

This commit is contained in:
Harrison Healey 2016-10-11 11:22:34 -04:00
parent 567a2b4782
commit d8285fb0b4
2 changed files with 14 additions and 4 deletions

View file

@ -120,9 +120,18 @@ export default class RootNavigator extends React.Component {
return (
<SelectServerView
onProceed={() => {
navigator.push({title: 'Sign In', signin: true});
navigator.push({signin: true});
}}
/>);
/>
);
} else if (route.signin) {
// return (
// <LoginView
// onSignIn={() => {
// navigator.push({title: 'Team Selection', });
// }}
// />
// );
}
return null;

View file

@ -68,12 +68,13 @@ class SelectServerView extends Component {
<TextInput
style={GlobalStyles.inputBox}
onChangeText={(serverUrl) => this.setState({serverUrl})}
onSubmitEditing={this.onClick}
autoCapitalize='none'
autoCorrect={false}
keyboardType='url'
placeholder='https://mattermost.example.com'
returnKeyType='done'
defaultValue={this.state.serverUrl}
returnKeyType='go'
value={this.state.serverUrl}
/>
<Button
text='Proceed'