[FIX] ProfileView input navigation error when custom fields aren't set (#1383)
This commit is contained in:
parent
1b2833107f
commit
447b48360f
|
@ -366,7 +366,7 @@ class ProfileView extends React.Component {
|
||||||
const {
|
const {
|
||||||
name, username, email, newPassword, avatarUrl, customFields, avatar, saving, showPasswordAlert
|
name, username, email, newPassword, avatarUrl, customFields, avatar, saving, showPasswordAlert
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { baseUrl, user } = this.props;
|
const { baseUrl, user, Accounts_CustomFields } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardView
|
<KeyboardView
|
||||||
|
@ -424,7 +424,7 @@ class ProfileView extends React.Component {
|
||||||
value={newPassword}
|
value={newPassword}
|
||||||
onChangeText={value => this.setState({ newPassword: value })}
|
onChangeText={value => this.setState({ newPassword: value })}
|
||||||
onSubmitEditing={() => {
|
onSubmitEditing={() => {
|
||||||
if (Object.keys(customFields).length) {
|
if (Accounts_CustomFields && Object.keys(customFields).length) {
|
||||||
return this[Object.keys(customFields)[0]].focus();
|
return this[Object.keys(customFields)[0]].focus();
|
||||||
}
|
}
|
||||||
this.avatarUrl.focus();
|
this.avatarUrl.focus();
|
||||||
|
|
Loading…
Reference in New Issue