Skip to content
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

Added ability to modify IOU Amount #7433

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2bd5fab
Added textInput selection and amount handling
sig5 Jan 27, 2022
32fe495
added newline at the end
sig5 Jan 27, 2022
4c539dd
updated comment
sig5 Jan 27, 2022
52da595
refactor vars
sig5 Jan 27, 2022
46ae4ed
adjusted spacing
sig5 Jan 27, 2022
9ebaa10
removed stray comments
sig5 Jan 27, 2022
089bc5c
seperated out ios and native
sig5 Jan 31, 2022
1ba2b36
seperated ios file
sig5 Feb 6, 2022
e250560
moved to a folder
sig5 Feb 6, 2022
62c3a02
aggregated proptypes
sig5 Feb 6, 2022
034b495
Seperated common utility functions
sig5 Feb 6, 2022
19afb18
Seperated common utility functions
sig5 Feb 6, 2022
9257036
fixed binding issues
sig5 Feb 7, 2022
947722c
Added base page
sig5 Feb 7, 2022
6fb8c01
Added base page
sig5 Feb 7, 2022
cb78b21
Added base page
sig5 Feb 7, 2022
91949b0
modified ios for base page props
sig5 Feb 7, 2022
2e4451a
Removed utils file
sig5 Feb 7, 2022
3a700b7
fixed ios issue
sig5 Feb 7, 2022
db06889
restructured components
sig5 Feb 7, 2022
009bf34
Moved proptypes
sig5 Feb 7, 2022
d395e9b
renamed component
sig5 Feb 7, 2022
a0fd923
reverted base rename
sig5 Feb 7, 2022
520777e
fixed imports
sig5 Feb 7, 2022
e087767
Added proptypes
sig5 Feb 7, 2022
be2cb81
resolved merge conflict
sig5 Feb 8, 2022
f4712f9
resolved conflict
sig5 Feb 8, 2022
8413b6c
fixed linting issue
sig5 Feb 8, 2022
7de268d
Handled edge case
sig5 Feb 8, 2022
0ba3d06
fixed formatting
sig5 Feb 8, 2022
adb445a
Added newline
sig5 Feb 8, 2022
007d0ed
Added comment
sig5 Feb 9, 2022
95fdb1c
updated comment
sig5 Feb 9, 2022
a28c586
Merge branch 'main' into fix-#6154
sig5 Feb 10, 2022
87c07d6
Removed IOUAmountPage.js
sig5 Feb 10, 2022
bac0d43
Added merge changes
sig5 Feb 10, 2022
a408610
Added isValueControlled prop
sig5 Feb 15, 2022
834f090
Added isValueControlled Prop
sig5 Feb 16, 2022
56c8a86
added defaultprop
sig5 Feb 16, 2022
149f360
Modified comment
sig5 Feb 17, 2022
5dca567
Modified comment
sig5 Feb 17, 2022
b1f1026
Modified comment
sig5 Feb 17, 2022
3161df7
Refactoring code
sig5 Feb 17, 2022
143a4cb
Added utility class
sig5 Feb 17, 2022
3a47af0
handled propTypes
sig5 Feb 17, 2022
f675b01
fixed proptypes
sig5 Feb 17, 2022
1e14145
Moved files
sig5 Feb 17, 2022
b1121de
Resolved spaces comments and newlines
sig5 Feb 18, 2022
a733f92
merged main
sig5 Mar 25, 2022
beb3fe8
fixed ref
sig5 Mar 25, 2022
858773e
fixed naming
sig5 Mar 26, 2022
96a2419
fixed safari copy paste issue
sig5 Mar 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ class BaseTextInput extends Component {
if (this.props.value === undefined || this.state.value === this.props.value) {
return;
}

// eslint-disable-next-line react/no-did-update-set-state
this.setState({value: this.props.value});
this.input.setNativeProps({text: this.props.value});
if (!this.props.isValueControlled) {
this.input.setNativeProps({text: this.props.value});
}

// In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput.
if (this.props.value === '') {
Expand Down Expand Up @@ -250,6 +251,7 @@ class BaseTextInput extends Component {
}}
// eslint-disable-next-line
{...inputProps}
value={this.props.isValueControlled ? this.props.value : undefined}
defaultValue={this.state.value}
placeholder={placeholder}
placeholderTextColor={themeColors.placeholderText}
Expand Down
10 changes: 10 additions & 0 deletions src/components/TextInput/baseTextInputPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ const propTypes = {
/** Default value - used for non controlled inputs */
defaultValue: PropTypes.string,

/**
* This prop should be used in iOS to make value prop controlled.
* iOS has incorrect selection(caret) position when value or
* selection is directly manipulated.
* Warning:This prop should be used for iOS devices only and it
* will cause missing cut/copy menu on android devices.
*/
isValueControlled: PropTypes.bool,

/** Input value placeholder */
placeholder: PropTypes.string,

Expand Down Expand Up @@ -77,6 +86,7 @@ const propTypes = {

const defaultProps = {
isFormInput: false,
isValueControlled: false,
label: '',
name: '',
errorText: '',
Expand Down
272 changes: 0 additions & 272 deletions src/pages/iou/steps/IOUAmountPage.js

This file was deleted.

Loading