diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 0975d4db8630..756bedaff93b 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -94,6 +94,8 @@ class ScreenWrapper extends React.Component { } render() { + const maxHeight = this.props.shouldEnableMaxHeight ? this.props.windowHeight : undefined; + return ( {({ @@ -120,7 +122,7 @@ class ScreenWrapper extends React.Component { // eslint-disable-next-line react/jsx-props-no-spreading {...(this.props.environment === CONST.ENVIRONMENT.DEV ? this.panResponder.panHandlers : {})} > - + {(this.props.environment === CONST.ENVIRONMENT.DEV) && } {(this.props.environment === CONST.ENVIRONMENT.DEV) && } diff --git a/src/components/ScreenWrapper/propTypes.js b/src/components/ScreenWrapper/propTypes.js index 1eabcaa010ce..19d065fe5b15 100644 --- a/src/components/ScreenWrapper/propTypes.js +++ b/src/components/ScreenWrapper/propTypes.js @@ -34,6 +34,9 @@ const propTypes = { /** Whether to dismiss keyboard before leaving a screen */ shouldDismissKeyboardBeforeClose: PropTypes.bool, + /** Whether to use the maxHeight (true) or use the 100% of the height (false) */ + shouldEnableMaxHeight: PropTypes.bool, + ...windowDimensionsPropTypes, ...environmentPropTypes, @@ -47,6 +50,7 @@ const defaultProps = { onEntryTransitionEnd: () => {}, modal: {}, keyboardAvoidingViewBehavior: 'padding', + shouldEnableMaxHeight: false, }; export {propTypes, defaultProps}; diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 0ca8d13fbcc8..b8f171574201 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -233,7 +233,7 @@ class NewChatPage extends Component { maxParticipantsReached, ); return ( - + {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( <> + { /> ); const amountButtonText = isEditingAmountAfterConfirm ? props.translate('common.save') : props.translate('common.next'); + const enableMaxHeight = DeviceCapabilities.canUseTouchScreen() && currentStep === Steps.MoneyRequestParticipants; + return ( - + {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( <> diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 413e742372cb..027f8ca81e77 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -300,7 +300,7 @@ class WorkspaceInvitePage extends React.Component { const policyName = lodashGet(this.props.policy, 'name'); return ( - + {({didScreenTransitionEnd}) => (