Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Oct 29, 2021
1 parent d8e24c7 commit 7cf6954
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/AddressSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AddressSearch extends React.Component {

this.state = {
displayDropdownBorder: false,
}
};
this.googlePlacesRef = React.createRef();
}

Expand Down Expand Up @@ -84,11 +84,11 @@ class AddressSearch extends React.Component {
this.props.onChangeText('addressState', null);
this.props.onChangeText('addressZipCode', null);
}
};
}

render() {
return (

// We use the View height to determine if we should hide the border and margin of the listView dropdown
// to prevent a lingering border when there are no address suggestions
<View
Expand Down Expand Up @@ -120,7 +120,7 @@ class AddressSearch extends React.Component {
errorText: this.props.errorText,
onChangeText: (text) => {
const isTextValid = !_.isEmpty(text) && _.isEqual(text, this.props.value);

// Ensure whether an address is selected already or has address value initialized.
if (!_.isEmpty(this.googlePlacesRef.current.getAddressText()) && !isTextValid) {
this.saveLocationDetails({});
Expand Down Expand Up @@ -149,7 +149,7 @@ class AddressSearch extends React.Component {
</View>
);
}
};
}

AddressSearch.propTypes = propTypes;
AddressSearch.defaultProps = defaultProps;
Expand Down

0 comments on commit 7cf6954

Please sign in to comment.