Skip to content

Commit 1ff6625

Browse files
Merge pull request #8647 from Expensify/cmartins-renameOnChange
Rename onChange to onInputChage in AddressSearch
2 parents 351619d + 396a6b0 commit 1ff6625

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/components/AddressSearch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const propTypes = {
4444
value: PropTypes.string,
4545

4646
/** A callback function when the value of this field has changed */
47-
onChange: PropTypes.func.isRequired,
47+
onInputChange: PropTypes.func.isRequired,
4848

4949
/** Customize the TextInput container */
5050
containerStyles: PropTypes.arrayOf(PropTypes.object),
@@ -113,7 +113,7 @@ const AddressSearch = (props) => {
113113
if (_.size(values) === 0) {
114114
return;
115115
}
116-
props.onChange(values);
116+
props.onInputChange(values);
117117
};
118118

119119
return (
@@ -176,7 +176,7 @@ const AddressSearch = (props) => {
176176
autoComplete: 'off',
177177
onChangeText: (text) => {
178178
if (skippedFirstOnChangeTextRef.current) {
179-
props.onChange({street: text});
179+
props.onInputChange({street: text});
180180
} else {
181181
skippedFirstOnChangeTextRef.current = true;
182182
}

src/pages/EnablePayments/AdditionalDetailsStep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class AdditionalDetailsStep extends React.Component {
265265
label={this.props.translate(this.fieldNameTranslationKeys.addressStreet)}
266266
value={this.props.walletAdditionalDetailsDraft.addressStreet || ''}
267267
containerStyles={[styles.mt4]}
268-
onChange={(values) => {
268+
onInputChange={(values) => {
269269
const renamedFields = {
270270
street: 'addressStreet',
271271
state: 'addressState',

src/pages/ReimbursementAccount/AddressForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const AddressForm = props => (
5454
label={props.translate(props.streetTranslationKey)}
5555
containerStyles={[styles.mt4]}
5656
value={props.values.street}
57-
onChange={props.onFieldChange}
57+
onInputChange={props.onFieldChange}
5858
errorText={props.errors.street ? props.translate('bankAccount.error.addressStreet') : ''}
5959
/>
6060
<Text style={[styles.mutedTextLabel, styles.mt1]}>{props.translate('common.noPO')}</Text>

src/pages/settings/Payments/AddDebitCardPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class DebitCardPage extends Component {
270270
label={this.props.translate('addDebitCardPage.billingAddress')}
271271
containerStyles={[styles.mt4]}
272272
value={this.state.addressStreet}
273-
onChange={(values) => {
273+
onInputChange={(values) => {
274274
const renamedFields = {
275275
street: 'addressStreet',
276276
state: 'addressState',

src/stories/AddressSearch.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Template = (args) => {
2020
return (
2121
<AddressSearch
2222
value={value}
23-
onChange={({street}) => setValue(street)}
23+
onInputChange={({street}) => setValue(street)}
2424
// eslint-disable-next-line react/jsx-props-no-spreading
2525
{...args}
2626
/>

0 commit comments

Comments
 (0)