Merge pull request #30859 from ApeNox/patch-1

Update definitions to accommodate API changes
This commit is contained in:
Andrew Casey
2018-12-03 11:26:19 -08:00
committed by GitHub
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
// Type definitions for react-places-autocomplete 6.1
// Type definitions for react-places-autocomplete 7.2
// Project: https://github.com/kenny-hibino/react-places-autocomplete/
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>
// Andrew Makarov <https://github.com/r3nya>
@@ -15,13 +15,10 @@ export interface formattedSuggestionType {
}
export interface PropTypes {
inputProps: {
value: string;
onChange: (value: string) => void;
inputProps?: {
type?: string;
name?: string;
placeholder?: string;
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
disabled?: boolean;
};
onError?: (status: string, clearSuggestion: () => void) => void;
@@ -49,6 +46,9 @@ export interface PropTypes {
radius?: number | string;
types?: string[];
};
value?: string;
onChange?: (value: string) => void;
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
debounce?: number;
highlightFirstSuggestion?: boolean;
@@ -45,7 +45,7 @@ class Test extends React.Component {
return (
<form onSubmit={this.handleFormSubmit}>
<PlacesAutocomplete inputProps={inputProps} />
<PlacesAutocomplete value={this.state.address} onChange={this.onChange} />
</form>
);
}