From 7e6cadb66a8ed6d9d48a4003615bdf9dcedae873 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Tue, 16 Nov 2021 10:50:25 -0800 Subject: [PATCH 1/2] Fix switching to manual address when adding bank account --- src/pages/ReimbursementAccount/IdentityForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/IdentityForm.js b/src/pages/ReimbursementAccount/IdentityForm.js index 683de6a3f350..e5af2f379920 100644 --- a/src/pages/ReimbursementAccount/IdentityForm.js +++ b/src/pages/ReimbursementAccount/IdentityForm.js @@ -133,7 +133,7 @@ const IdentityForm = (props) => { errorText={props.errors.ssnLast4 ? props.translate('bankAccount.error.ssnLast4') : ''} maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.SSN} /> - {props.manualAddress ? ( + {props.values.manualAddress ? ( <> Date: Tue, 16 Nov 2021 12:37:43 -0800 Subject: [PATCH 2/2] Use props' `values` everywhere it's needed --- src/pages/ReimbursementAccount/IdentityForm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/ReimbursementAccount/IdentityForm.js b/src/pages/ReimbursementAccount/IdentityForm.js index e5af2f379920..2ab673659ee9 100644 --- a/src/pages/ReimbursementAccount/IdentityForm.js +++ b/src/pages/ReimbursementAccount/IdentityForm.js @@ -138,7 +138,7 @@ const IdentityForm = (props) => { props.onFieldChange('addressStreet', value)} errorText={props.errors.street ? props.translate('bankAccount.error.address') : ''} /> @@ -147,7 +147,7 @@ const IdentityForm = (props) => { props.onFieldChange('addressCity', value)} errorText={props.errors.city ? props.translate('bankAccount.error.addressCity') : ''} translateX={-14} @@ -155,7 +155,7 @@ const IdentityForm = (props) => { props.onFieldChange('addressState', value)} errorText={props.errors.state ? props.translate('bankAccount.error.addressState') : ''} hasError={Boolean(props.errors.state)} @@ -166,7 +166,7 @@ const IdentityForm = (props) => { label={props.translate('common.zip')} containerStyles={[styles.mt4]} keyboardType={CONST.KEYBOARD_TYPE.NUMERIC} - value={props.zipCode} + value={props.values.zipCode} onChangeText={value => props.onFieldChange('addressZipCode', value)} errorText={props.errors.zipCode ? props.translate('bankAccount.error.zipCode') : ''} maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}