diff --git a/GooglePlacesAutocomplete.d.ts b/GooglePlacesAutocomplete.d.ts index 726915f3..62beb526 100644 --- a/GooglePlacesAutocomplete.d.ts +++ b/GooglePlacesAutocomplete.d.ts @@ -413,7 +413,6 @@ interface GooglePlacesAutocompleteProps { renderLeftButton?: () => JSX.Element | React.ComponentType<{}>; renderRightButton?: () => JSX.Element | React.ComponentType<{}>; renderRow?: (data: GooglePlaceData) => JSX.Element | React.ComponentType<{}>; - // sets the request URL to something other than the google api. Helpful if you want web support or to use your own api. requestUrl?: RequestUrl; styles?: Partial | Object; diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index aba84dd9..1a3335d5 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -642,7 +642,10 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { ); }; - const isNewFocusInAutocompleteResultList = ({ relatedTarget, currentTarget }) => { + const isNewFocusInAutocompleteResultList = ({ + relatedTarget, + currentTarget, + }) => { if (!relatedTarget) return false; var node = relatedTarget.parentNode; @@ -653,13 +656,12 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { } return false; - } + }; const _onBlur = (e) => { if (e && isNewFocusInAutocompleteResultList(e)) return; setListViewDisplayed(false); - inputRef?.current?.blur(); }; @@ -733,7 +735,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { ) { return (