Skip to content

Commit

Permalink
fix(ts-error): add JSX.Element type option in addition to dep React.C…
Browse files Browse the repository at this point in the history
…omponentType

should replace ComponentType with ElementType in future but did not fix for me
  • Loading branch information
rgordon95 authored and bell-steven committed Nov 11, 2020
1 parent 275a290 commit dc235c6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions GooglePlacesAutocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ interface GooglePlacesAutocompleteProps {
isRowScrollable?: boolean;
keyboardShouldPersistTaps?: 'never' | 'always' | 'handled';
// use the ListEmptyComponent prop when no autocomplete results are found.
listEmptyComponent?: React.ComponentType<{}>;
listEmptyComponent?: JSX.Element | React.ComponentType<{}>;
listUnderlayColor?: string;
listViewDisplayed?: 'auto' | boolean;
minLength?: number; // minimum length of text to search
Expand All @@ -403,10 +403,11 @@ interface GooglePlacesAutocompleteProps {
preProcess?: (text: string) => string;
query: Query;
renderDescription?: (description: DescriptionRow) => string;
renderHeaderComponent?: () => React.ComponentType<{}>;
renderLeftButton?: () => React.ComponentType<{}>;
renderRightButton?: () => React.ComponentType<{}>;
renderRow?: (data: GooglePlaceData) => React.ComponentType<{}>;
renderHeaderComponent?: () => JSX.Element | React.ComponentType<{}>;
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>;
Expand Down

0 comments on commit dc235c6

Please sign in to comment.