diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 28cb56ecbfa2..0f5552462212 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -85,6 +85,8 @@ class ScreenWrapper extends React.Component { } render() { + const maxHeight = this.props.shouldEnableMaxHeight ? this.props.windowHeight : undefined; + return ( {({ @@ -109,7 +111,7 @@ class ScreenWrapper extends React.Component { paddingStyle, ]} > - + {// If props.children is a function, call it to provide the insets to the children. _.isFunction(this.props.children) diff --git a/src/components/ScreenWrapper/propTypes.js b/src/components/ScreenWrapper/propTypes.js index 1328f2929d18..8e9bbadbb3ae 100644 --- a/src/components/ScreenWrapper/propTypes.js +++ b/src/components/ScreenWrapper/propTypes.js @@ -33,6 +33,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, }; @@ -44,6 +47,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 e1fbdbeda817..fecc9a212b70 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}) => (