mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Resolve conflict
This commit is contained in:
+6
-5
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/kenny-hibino/react-places-autocomplete/
|
||||
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>
|
||||
// Andrew Makarov <https://github.com/r3nya>
|
||||
// Nokky Goren <https://github.com/ApeNox>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
//
|
||||
@@ -14,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;
|
||||
@@ -40,7 +38,7 @@ export interface PropTypes {
|
||||
autocompleteItem?: React.CSSProperties;
|
||||
autocompleteItemActive?: React.CSSProperties;
|
||||
};
|
||||
options?: {
|
||||
searchOptions?: {
|
||||
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
|
||||
componentRestrictions?: google.maps.GeocoderComponentRestrictions;
|
||||
location?: google.maps.LatLng | google.maps.LatLngLiteral;
|
||||
@@ -48,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;
|
||||
|
||||
@@ -40,14 +40,9 @@ class Test extends React.Component {
|
||||
onChange = (address: string) => this.setState({ address });
|
||||
|
||||
render() {
|
||||
const inputProps = {
|
||||
value: this.state.address,
|
||||
onChange: this.onChange,
|
||||
};
|
||||
|
||||
return (
|
||||
<form onSubmit={this.handleFormSubmit}>
|
||||
<PlacesAutocomplete inputProps={inputProps} googleCallbackName="google_callback_name" />
|
||||
<PlacesAutocomplete value={this.state.address} onChange={this.onChange} googleCallbackName="google_callback_name" />
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user