Skip to content

Commit dc235c6

Browse files
rgordon95bell-steven
authored andcommitted
fix(ts-error): add JSX.Element type option in addition to dep React.ComponentType
should replace ComponentType with ElementType in future but did not fix for me
1 parent 275a290 commit dc235c6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

GooglePlacesAutocomplete.d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ interface GooglePlacesAutocompleteProps {
386386
isRowScrollable?: boolean;
387387
keyboardShouldPersistTaps?: 'never' | 'always' | 'handled';
388388
// use the ListEmptyComponent prop when no autocomplete results are found.
389-
listEmptyComponent?: React.ComponentType<{}>;
389+
listEmptyComponent?: JSX.Element | React.ComponentType<{}>;
390390
listUnderlayColor?: string;
391391
listViewDisplayed?: 'auto' | boolean;
392392
minLength?: number; // minimum length of text to search
@@ -403,10 +403,11 @@ interface GooglePlacesAutocompleteProps {
403403
preProcess?: (text: string) => string;
404404
query: Query;
405405
renderDescription?: (description: DescriptionRow) => string;
406-
renderHeaderComponent?: () => React.ComponentType<{}>;
407-
renderLeftButton?: () => React.ComponentType<{}>;
408-
renderRightButton?: () => React.ComponentType<{}>;
409-
renderRow?: (data: GooglePlaceData) => React.ComponentType<{}>;
406+
renderHeaderComponent?: () => JSX.Element | React.ComponentType<{}>;
407+
renderLeftButton?: () => JSX.Element | React.ComponentType<{}>;
408+
renderRightButton?: () => JSX.Element | React.ComponentType<{}>;
409+
renderRow?: (data: GooglePlaceData) => JSX.Element | React.ComponentType<{}>;
410+
410411
// sets the request URL to something other than the google api. Helpful if you want web support or to use your own api.
411412
requestUrl?: RequestUrl;
412413
styles?: Partial<Styles>;

0 commit comments

Comments
 (0)