Skip to content

Commit

Permalink
run yarn lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bell-steven committed Dec 10, 2020
1 parent dd8f63e commit 800af72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion GooglePlacesAutocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Styles> | Object;
Expand Down
10 changes: 6 additions & 4 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
};

Expand Down Expand Up @@ -733,7 +735,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
) {
return (
<FlatList
nativeID="result-list-id"
nativeID='result-list-id'
scrollEnabled={!props.disableScroll}
style={[
props.suppressDefaultStyles ? {} : defaultStyles.listView,
Expand Down

0 comments on commit 800af72

Please sign in to comment.