File tree 1 file changed +11
-1
lines changed 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ class WorkspaceInvitePage extends React.Component {
55
55
welcomeNote : '' ,
56
56
} ;
57
57
58
+ this . focusEmailOrPhoneInput = this . focusEmailOrPhoneInput . bind ( this ) ;
58
59
this . inviteUser = this . inviteUser . bind ( this ) ;
60
+ this . emailOrPhoneInputRef = null ;
59
61
}
60
62
61
63
/**
@@ -69,6 +71,13 @@ class WorkspaceInvitePage extends React.Component {
69
71
} ) ;
70
72
}
71
73
74
+ focusEmailOrPhoneInput ( ) {
75
+ if ( ! this . emailOrPhoneInputRef ) {
76
+ return ;
77
+ }
78
+ this . emailOrPhoneInputRef . focus ( ) ;
79
+ }
80
+
72
81
/**
73
82
* Handle the invite button click
74
83
*/
@@ -93,7 +102,7 @@ class WorkspaceInvitePage extends React.Component {
93
102
94
103
render ( ) {
95
104
return (
96
- < ScreenWrapper >
105
+ < ScreenWrapper onTransitionEnd = { this . focusEmailOrPhoneInput } >
97
106
< KeyboardAvoidingView >
98
107
< HeaderWithCloseButton
99
108
title = { this . props . translate ( 'workspace.invite.invitePeople' ) }
@@ -105,6 +114,7 @@ class WorkspaceInvitePage extends React.Component {
105
114
</ Text >
106
115
< View style = { styles . mb6 } >
107
116
< ExpensiTextInput
117
+ ref = { el => this . emailOrPhoneInputRef = el }
108
118
label = { this . props . translate ( 'workspace.invite.enterEmailOrPhone' ) }
109
119
autoCompleteType = "email"
110
120
autoCorrect = { false }
You can’t perform that action at this time.
0 commit comments