From 652791b58bdd71627dc0911c4310ed89e066ca21 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Wed, 26 Jan 2022 22:18:05 +0530 Subject: [PATCH 1/2] Show number pad on all touch devices --- src/pages/iou/steps/IOUAmountPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/steps/IOUAmountPage.js b/src/pages/iou/steps/IOUAmountPage.js index 7e5d6898924e..980f6fb56a91 100755 --- a/src/pages/iou/steps/IOUAmountPage.js +++ b/src/pages/iou/steps/IOUAmountPage.js @@ -20,6 +20,7 @@ import Button from '../../../components/Button'; import Text from '../../../components/Text'; import CONST from '../../../CONST'; import TextInputAutoWidthWithoutKeyboard from '../../../components/TextInputAutoWidthWithoutKeyboard'; +import canUseTouchScreen from '../../../libs/canUseTouchscreen'; const propTypes = { /** Whether or not this IOU has multiple participants */ @@ -239,7 +240,7 @@ class IOUAmountPage extends React.Component { /> - {this.props.isSmallScreenWidth + {canUseTouchScreen() ? ( Date: Wed, 26 Jan 2022 22:32:18 +0530 Subject: [PATCH 2/2] Remove extra Window props --- src/pages/iou/steps/IOUAmountPage.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pages/iou/steps/IOUAmountPage.js b/src/pages/iou/steps/IOUAmountPage.js index 980f6fb56a91..79136e69cbad 100755 --- a/src/pages/iou/steps/IOUAmountPage.js +++ b/src/pages/iou/steps/IOUAmountPage.js @@ -11,7 +11,6 @@ import _ from 'underscore'; import ONYXKEYS from '../../../ONYXKEYS'; import styles from '../../../styles/styles'; import BigNumberPad from '../../../components/BigNumberPad'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; import Navigation from '../../../libs/Navigation/Navigation'; import ROUTES from '../../../ROUTES'; import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; @@ -47,9 +46,6 @@ const propTypes = { /** Previously selected amount to show if the user comes back to this screen */ selectedAmount: PropTypes.string.isRequired, - /** Window Dimensions Props */ - ...windowDimensionsPropTypes, - /* Onyx Props */ /** Holds data related to IOU view state, rather than the underlying IOU data. */ @@ -265,7 +261,6 @@ IOUAmountPage.propTypes = propTypes; IOUAmountPage.defaultProps = defaultProps; export default compose( - withWindowDimensions, withLocalize, withOnyx({ currencyList: {key: ONYXKEYS.CURRENCY_LIST},