-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Keep textinput focused if no amount is entered #9064
Changes from 3 commits
1a552e2
3b17c39
3e5c260
74322f1
8a8c6c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,9 +217,11 @@ class IOUAmountPage extends React.Component { | |
styles.justifyContentCenter, | ||
]} | ||
> | ||
<TouchableOpacity onPress={() => Navigation.navigate(this.props.hasMultipleParticipants | ||
? ROUTES.getIouBillCurrencyRoute(this.props.reportID) | ||
: ROUTES.getIouRequestCurrencyRoute(this.props.reportID))} | ||
<TouchableOpacity onPress={() => { | ||
if (this.props.hasMultipleParticipants) { return Navigation.navigate(ROUTES.getIouBillCurrencyRoute(this.props.reportID)); } | ||
if (this.props.iouType === CONST.IOU.IOU_TYPE.SEND) { return Navigation.navigate(ROUTES.getIouSendCurrencyRoute(this.props.reportID)); } | ||
return Navigation.navigate(ROUTES.getIouRequestCurrencyRoute(this.props.reportID)); | ||
}} | ||
> | ||
<Text style={styles.iouAmountText}> | ||
{lodashGet(this.props.currencyList, [this.props.iou.selectedCurrencyCode, 'symbol'])} | ||
|
@@ -236,6 +238,7 @@ class IOUAmountPage extends React.Component { | |
value={formattedAmount} | ||
placeholder={this.props.numberFormat(0)} | ||
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD} | ||
blurOnSubmit={this.state.amount !== ''} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sobitneupane can we keep There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are trying to make blurOnSubmit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not add extra logic if it isn't needed. The keyboard isn't open on this page, so it should be fine There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested and pushed the change. Working fine in my side. Please test it in your side as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, thanks for testing it |
||
/> | ||
</View> | ||
<View style={[styles.w100, styles.justifyContentEnd]}> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sobitneupane please bring the return statements to a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.