From 253f8449a9e7f2174f58b670dc7a1418abbac5ac Mon Sep 17 00:00:00 2001 From: Aryk Grosz Date: Sat, 24 Apr 2021 18:51:36 -0700 Subject: [PATCH] Fix listViewDisplayed warning with propTypes --- GooglePlacesAutocomplete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index 79723a3..e881c3b 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -848,7 +848,8 @@ GooglePlacesAutocomplete.propTypes = { keyboardShouldPersistTaps: PropTypes.oneOf(['never', 'always', 'handled']), listEmptyComponent: PropTypes.func, listUnderlayColor: PropTypes.string, - listViewDisplayed: PropTypes.oneOf(['auto', PropTypes.bool]), + // Must write it this way: https://stackoverflow.com/a/54290946/7180620 + listViewDisplayed: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['auto'])]), keepResultsAfterBlur: PropTypes.bool, minLength: PropTypes.number, nearbyPlacesAPI: PropTypes.string,