Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomanjyotisa committed Sep 23, 2024
1 parent b7ff12c commit d400ccb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/AddressSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ function AddressSearch(
const filteredPredefinedPlaces = useMemo(() => {
if (!searchValue) {
return predefinedPlaces ?? [];
} else if (shouldHidePredefinedPlaces) {
}
if (shouldHidePredefinedPlaces) {
return [];
}
return predefinedPlaces?.filter((predefinedPlace) => isPlaceMatchForSearch(searchValue, predefinedPlace)) ?? [];
}, [predefinedPlaces, searchValue]);
}, [predefinedPlaces, searchValue, shouldHidePredefinedPlaces]);

const listEmptyComponent = useMemo(
() => (!isTyping ? undefined : <Text style={[styles.textLabel, styles.colorMuted, styles.pv4, styles.ph3, styles.overflowAuto]}>{translate('common.noResultsFound')}</Text>),
Expand Down

0 comments on commit d400ccb

Please sign in to comment.