From b8cfb933167bce99ab21aedb991e36f411e686e0 Mon Sep 17 00:00:00 2001 From: meriadec Date: Tue, 15 Jan 2019 13:38:52 +0100 Subject: [PATCH] Fix submit of account settings --- src/components/modals/AccountSettingRenderBody.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/modals/AccountSettingRenderBody.js b/src/components/modals/AccountSettingRenderBody.js index 552470bd..ec5cc8d4 100644 --- a/src/components/modals/AccountSettingRenderBody.js +++ b/src/components/modals/AccountSettingRenderBody.js @@ -123,7 +123,7 @@ class AccountSettingRenderBody extends PureComponent { }) handleSubmit = (account: Account, onClose: () => void) => ( - e: SyntheticEvent, + e: SyntheticEvent, ) => { e.preventDefault() const { updateAccount, setDataModal } = this.props @@ -199,12 +199,14 @@ class AccountSettingRenderBody extends PureComponent { blockHeight: account.blockHeight, } + const onSubmit = this.handleSubmit(account, onClose) + return ( ( -
+ @@ -218,6 +220,7 @@ class AccountSettingRenderBody extends PureComponent { value={account.name} maxLength={MAX_ACCOUNT_NAME_SIZE} onChange={this.handleChangeName} + onEnter={onSubmit} onFocus={e => this.handleFocus(e, 'accountName')} error={accountNameError} /> @@ -289,7 +292,7 @@ class AccountSettingRenderBody extends PureComponent { subTitle={t('common.areYouSure')} desc={t('settings.removeAccountModal.desc')} /> - +
)} renderFooter={() => ( @@ -301,7 +304,7 @@ class AccountSettingRenderBody extends PureComponent { > {t('common.delete')} -