Skip to content

Commit

Permalink
fix scroll at new task page
Browse files Browse the repository at this point in the history
  • Loading branch information
jeet-dhandha committed Sep 20, 2023
1 parent 1e1b83c commit 04c6a97
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions src/pages/tasks/NewTaskPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useMemo, useState} from 'react';
import {View} from 'react-native';
import {ScrollView, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -149,50 +149,52 @@ function NewTaskPage(props) {
Navigation.goBack(ROUTES.NEW_TASK_DETAILS);
}}
/>
<View style={[styles.containerWithSpaceBetween]}>
<View style={styles.mb5}>
<MenuItemWithTopDescription
description={props.translate('task.title')}
title={title}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_TITLE)}
shouldShowRightIcon
/>
<MenuItemWithTopDescription
description={props.translate('task.description')}
title={description}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_DESCRIPTION)}
shouldShowRightIcon
shouldParseTitle
numberOfLinesTitle={2}
titleStyle={styles.flex1}
/>
<MenuItem
label={assignee.displayName ? props.translate('task.assignee') : ''}
title={assignee.displayName || ''}
description={assignee.displayName ? LocalePhoneNumber.formatPhoneNumber(assignee.subtitle) : props.translate('task.assignee')}
icon={assignee.icons}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_ASSIGNEE)}
shouldShowRightIcon
/>
<MenuItem
label={shareDestination.displayName ? props.translate('newTaskPage.shareSomewhere') : ''}
title={shareDestination.displayName || ''}
description={shareDestination.displayName ? shareDestination.subtitle : props.translate('newTaskPage.shareSomewhere')}
icon={shareDestination.icons}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)}
interactive={!props.task.parentReportID}
shouldShowRightIcon={!props.task.parentReportID}
<ScrollView>
<View style={[styles.containerWithSpaceBetween]}>
<View style={styles.mb5}>
<MenuItemWithTopDescription
description={props.translate('task.title')}
title={title}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_TITLE)}
shouldShowRightIcon
/>
<MenuItemWithTopDescription
description={props.translate('task.description')}
title={description}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_DESCRIPTION)}
shouldShowRightIcon
shouldParseTitle
numberOfLinesTitle={2}
titleStyle={styles.flex1}
/>
<MenuItem
label={assignee.displayName ? props.translate('task.assignee') : ''}
title={assignee.displayName || ''}
description={assignee.displayName ? LocalePhoneNumber.formatPhoneNumber(assignee.subtitle) : props.translate('task.assignee')}
icon={assignee.icons}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_ASSIGNEE)}
shouldShowRightIcon
/>
<MenuItem
label={shareDestination.displayName ? props.translate('newTaskPage.shareSomewhere') : ''}
title={shareDestination.displayName || ''}
description={shareDestination.displayName ? shareDestination.subtitle : props.translate('newTaskPage.shareSomewhere')}
icon={shareDestination.icons}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)}
interactive={!props.task.parentReportID}
shouldShowRightIcon={!props.task.parentReportID}
/>
</View>
<FormAlertWithSubmitButton
isAlertVisible={!_.isEmpty(errorMessage)}
message={errorMessage}
onSubmit={() => onSubmit()}
enabledWhenOffline
buttonText={props.translate('newTaskPage.confirmTask')}
containerStyles={[styles.mh0, styles.mt5, styles.flex1, styles.ph5]}
/>
</View>
<FormAlertWithSubmitButton
isAlertVisible={!_.isEmpty(errorMessage)}
message={errorMessage}
onSubmit={() => onSubmit()}
enabledWhenOffline
buttonText={props.translate('newTaskPage.confirmTask')}
containerStyles={[styles.mh0, styles.mt5, styles.flex1, styles.ph5]}
/>
</View>
</ScrollView>
</FullPageNotFoundView>
</ScreenWrapper>
);
Expand Down

0 comments on commit 04c6a97

Please sign in to comment.