Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const propTypes = {
/** Maximum number of characters allowed in search input */
maxInputLength: PropTypes.number,

/** The result types to return from the Google Places Autocomplete request */
resultTypes: PropTypes.string,

/** Information about the network */
network: networkPropTypes.isRequired,

Expand Down Expand Up @@ -123,6 +126,7 @@ const defaultProps = {
},
maxInputLength: undefined,
predefinedPlaces: [],
resultTypes: 'address',
};

// Do not convert to class component! It's been tried before and presents more challenges than it's worth.
Expand All @@ -134,10 +138,10 @@ function AddressSearch(props) {
const query = useMemo(
() => ({
language: props.preferredLocale,
types: 'address',
types: props.resultTypes,
components: props.isLimitedToUSA ? 'country:us' : undefined,
}),
[props.preferredLocale, props.isLimitedToUSA],
[props.preferredLocale, props.resultTypes, props.isLimitedToUSA],
);

const saveLocationDetails = (autocompleteData, details) => {
Expand Down
1 change: 1 addition & 0 deletions src/pages/iou/WaypointEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI
state: null,
}}
predefinedPlaces={recentWaypoints}
resultTypes=""
/>
</View>
</Form>
Expand Down