Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add autofocus #4402

Merged
merged 4 commits into from
Aug 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/pages/workspace/WorkspaceInvitePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class WorkspaceInvitePage extends React.Component {
};

this.inviteUser = this.inviteUser.bind(this);
this.emailOrPhoneInputRef = null;
}

/**
Expand Down Expand Up @@ -86,7 +87,12 @@ class WorkspaceInvitePage extends React.Component {

render() {
return (
<ScreenWrapper>
<ScreenWrapper onTransitionEnd={() => {
if (this.emailOrPhoneInputRef) {
this.emailOrPhoneInputRef.focus();
}
aman-atg marked this conversation as resolved.
Show resolved Hide resolved
}}
>
<KeyboardAvoidingView>
<HeaderWithCloseButton
title={this.props.translate('workspace.invite.invitePeople')}
Expand All @@ -101,6 +107,7 @@ class WorkspaceInvitePage extends React.Component {
{this.props.translate('workspace.invite.enterEmailOrPhone')}
</Text>
<TextInput
ref={el => this.emailOrPhoneInputRef = el}
autoCompleteType="email"
autoCorrect={false}
autoCapitalize="none"
Expand Down