Skip to content

Commit

Permalink
Merge pull request #28124 from DylanDylann/fix/27165
Browse files Browse the repository at this point in the history
Fix/27165: Only display recent destination if search input is empty
  • Loading branch information
youssef-lr authored Oct 2, 2023
2 parents a9d8495 + b12711c commit db48d05
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "2.12.0",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1",
"react-native-haptic-feedback": "^1.13.0",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-picker": "^5.1.0",
Expand Down
6 changes: 6 additions & 0 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ function AddressSearch(props) {
<Text style={[styles.textLabel, styles.colorMuted, styles.pv4, styles.ph3, styles.overflowAuto]}>{props.translate('common.noResultsFound')}</Text>
)
}
renderHeaderComponent={() =>
!props.value &&
props.predefinedPlaces && (
<Text style={[styles.textLabel, styles.colorMuted, styles.pt2, styles.ph3, styles.overflowAuto]}>{props.translate('common.recentDestinations')}</Text>
)
}
onPress={(data, details) => {
saveLocationDetails(data, details);

Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export default {
notifications: 'Notifications',
na: 'N/A',
noResultsFound: 'No results found',
recentDestinations: 'Recent destinations',
timePrefix: "It's",
conjunctionFor: 'for',
todayAt: 'Today at',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export default {
notifications: 'Notificaciones',
na: 'N/A',
noResultsFound: 'No se han encontrado resultados',
recentDestinations: 'Destinos recientes',
timePrefix: 'Son las',
conjunctionFor: 'para',
todayAt: 'Hoy a las',
Expand Down
1 change: 0 additions & 1 deletion src/pages/iou/WaypointEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ function WaypointEditor({route: {params: {iouType = '', transactionID = '', wayp
state: null,
}}
predefinedPlaces={recentWaypoints}
resultTypes=""
/>
</View>
</Form>
Expand Down

0 comments on commit db48d05

Please sign in to comment.