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

[Form Provider Refactor] PrivateNotesEditPage #30071

Merged
Changes from all commits
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
10 changes: 6 additions & 4 deletions src/pages/PrivateNotes/PrivateNotesEditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import ONYXKEYS from '../../ONYXKEYS';
import TextInput from '../../components/TextInput';
import CONST from '../../CONST';
import Text from '../../components/Text';
import Form from '../../components/Form';
import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView';
import reportPropTypes from '../reportPropTypes';
import personalDetailsPropType from '../personalDetailsPropType';
Expand All @@ -27,6 +26,8 @@ import OfflineWithFeedback from '../../components/OfflineWithFeedback';
import updateMultilineInputRange from '../../libs/UpdateMultilineInputRange';
import ROUTES from '../../ROUTES';
import * as ReportUtils from '../../libs/ReportUtils';
import InputWrapper from '../../components/Form/InputWrapper';
import FormProvider from '../../components/Form/FormProvider';

const propTypes = {
/** All of the personal details for everyone */
Expand Down Expand Up @@ -135,7 +136,7 @@ function PrivateNotesEditPage({route, personalDetailsList, session, report}) {
shouldShowBackButton
onCloseButtonPress={() => Navigation.dismissModal()}
/>
<Form
<FormProvider
formID={ONYXKEYS.FORMS.PRIVATE_NOTES_FORM}
onSubmit={savePrivateNote}
style={[styles.flexGrow1, styles.ph5]}
Expand All @@ -156,7 +157,8 @@ function PrivateNotesEditPage({route, personalDetailsList, session, report}) {
onClose={() => Report.clearPrivateNotesError(report.reportID, route.params.accountID)}
style={[styles.mb3]}
>
<TextInput
<InputWrapper
InputComponent={TextInput}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
inputID="privateNotes"
label={translate('privateNotes.composerLabel')}
Expand All @@ -182,7 +184,7 @@ function PrivateNotesEditPage({route, personalDetailsList, session, report}) {
}}
/>
</OfflineWithFeedback>
</Form>
</FormProvider>
</FullPageNotFoundView>
</ScreenWrapper>
);
Expand Down
Loading