diff --git a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx index 7d72ac4397..3da7a4e81c 100644 --- a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx +++ b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx @@ -31,18 +31,30 @@ class Test extends React.Component { return (
- {({getInputProps, getSuggestionItemProps, suggestions}) => ( - <> - -
- {suggestions.map(suggestion => ( -
- {suggestion.description} -
- ))} -
- - )} + {({getInputProps, suggestions, getSuggestionItemProps, loading}) => { + const inputProps = getInputProps({ + required: true, + className: loading ? 'is-pending' : '' + }); + return ( + <> + +
+ {suggestions.map(suggestion => { + const divProps = getSuggestionItemProps(suggestion, { + className: suggestion.active ? 'active' : '' + }); + return ( +
+ {suggestion.description} +
+ ); + })} +
+ + ); + } + }
);