mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
[react-geosuggest] - update api to latest version (#22969)
* update react-geosuggest * take out patch number as DT CI doesn't like it
This commit is contained in:
Vendored
+3
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-geosuggest 2.3
|
||||
// Type definitions for react-geosuggest 2.7
|
||||
// Project: https://github.com/ubilabs/react-geosuggest
|
||||
// Definitions by: Brad Menchl <https://github.com/brmenchl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -32,6 +32,7 @@ export interface GeosuggestProps extends InputHTMLAttributes<HTMLInputElement> {
|
||||
googleMaps?: typeof google.maps;
|
||||
ignoreTab?: boolean;
|
||||
queryDelay?: number;
|
||||
minLength?: number;
|
||||
highlightMatch?: boolean;
|
||||
onFocus?(): void;
|
||||
onBlur?(value: any): void;
|
||||
@@ -39,6 +40,7 @@ export interface GeosuggestProps extends InputHTMLAttributes<HTMLInputElement> {
|
||||
onKeyDown?(event: any): void;
|
||||
onKeyPress?(event: any): void;
|
||||
onSuggestSelect?(suggest: Suggest): void;
|
||||
onUpdateSuggests?(suggests: any, activeSuggest: any): void;
|
||||
onActivateSuggest?(suggest: Suggest): void;
|
||||
onSuggestNoResults?(userInput: string): void;
|
||||
getSuggestLabel?(googleSuggest: google.maps.places.AutocompletePrediction): string;
|
||||
|
||||
@@ -24,6 +24,7 @@ function onKeyPress(event: any) {}
|
||||
function onChange(value: string) {}
|
||||
function onSuggestSelect(suggest: Suggest) {}
|
||||
function onSuggestNoResults(userInput: string) {}
|
||||
function onUpdateSuggests(suggests: any, activeSuggest: any) {}
|
||||
|
||||
class ReactGeosuggest extends React.Component {
|
||||
private geosuggest: any;
|
||||
@@ -55,8 +56,10 @@ class ReactGeosuggest extends React.Component {
|
||||
onKeyPress={onKeyPress}
|
||||
onSuggestNoResults={onSuggestNoResults}
|
||||
onSuggestSelect={onSuggestSelect}
|
||||
onUpdateSuggests={onUpdateSuggests}
|
||||
placeholder="Start typing!"
|
||||
queryDelay={250}
|
||||
minLength={2}
|
||||
radius={20}
|
||||
ref={el => this.geosuggest = el}
|
||||
renderSuggestItem={renderSuggestItem}
|
||||
|
||||
Reference in New Issue
Block a user