Skip to content

Commit

Permalink
Merge pull request #30420 from software-mansion-labs/form-migration/M…
Browse files Browse the repository at this point in the history
…oneyRequestMerchantPage

[Form Provider Refactor] MoneyRequestMerchantPage
  • Loading branch information
luacmartins authored Nov 9, 2023
2 parents 3432f08 + c4a3d17 commit 12966ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/iou/MoneyRequestMerchantPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import React, {useCallback, useEffect} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import Form from '@components/Form';
import FormProvider from '@components/Form/FormProvider';
import InputWrapperWithRef from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import TextInput from '@components/TextInput';
Expand Down Expand Up @@ -99,7 +100,7 @@ function MoneyRequestMerchantPage({iou, route}) {
title={translate('common.merchant')}
onBackButtonPress={() => navigateBack()}
/>
<Form
<FormProvider
style={[styles.flexGrow1, styles.ph5]}
formID={ONYXKEYS.FORMS.MONEY_REQUEST_MERCHANT_FORM}
onSubmit={(value) => updateMerchant(value)}
Expand All @@ -108,7 +109,8 @@ function MoneyRequestMerchantPage({iou, route}) {
enabledWhenOffline
>
<View style={styles.mb4}>
<TextInput
<InputWrapperWithRef
InputComponent={TextInput}
inputID="moneyRequestMerchant"
name="moneyRequestMerchant"
defaultValue={iou.merchant}
Expand All @@ -119,7 +121,7 @@ function MoneyRequestMerchantPage({iou, route}) {
ref={inputCallbackRef}
/>
</View>
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit 12966ae

Please sign in to comment.