react-native-google-places-autocomplete 2.6.4 → 2.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import {
3
3
  ImageStyle,
4
4
  StyleProp,
5
- TextInput,
6
5
  TextInputProps,
7
6
  TextStyle,
8
7
  ViewStyle,
@@ -413,19 +412,21 @@ interface GooglePlacesAutocompleteProps {
413
412
  minLength?: number;
414
413
  keepResultsAfterBlur?: boolean;
415
414
  /** Which API to use: GoogleReverseGeocoding or GooglePlacesSearch */
416
- nearbyPlacesAPI?: 'GoogleReverseGeocoding' | 'GooglePlacesSearch';
415
+ nearbyPlacesAPI?: 'GoogleReverseGeocoding' | 'GooglePlacesSearch' | 'None';
417
416
  numberOfLines?: number;
418
417
  onFail?: (error?: any) => void;
419
- onNotFound?: () => void;
418
+ onNotFound?: (response?: any) => void;
420
419
  onPress?: (data: GooglePlaceData, detail: GooglePlaceDetail | null) => void;
421
420
  onTimeout?: () => void;
422
- placeholder: string;
421
+ placeholder?: string;
423
422
  predefinedPlaces?: Place[];
424
423
  predefinedPlacesAlwaysVisible?: boolean;
425
424
  preProcess?: (text: string) => string;
426
- query: Query | Object;
427
- renderDescription?: (description: DescriptionRow) => string;
428
- renderHeaderComponent?: () => JSX.Element | React.ComponentType<{}>;
425
+ query?: Query | Object;
426
+ renderDescription?: (description: DescriptionRow) => React.ReactNode;
427
+ renderHeaderComponent?: (
428
+ text: string,
429
+ ) => JSX.Element | React.ComponentType<{}>;
429
430
  renderLeftButton?: () => JSX.Element | React.ComponentType<{}>;
430
431
  renderRightButton?: () => JSX.Element | React.ComponentType<{}>;
431
432
  renderRow?: (
@@ -442,13 +443,23 @@ interface GooglePlacesAutocompleteProps {
442
443
  timeout?: number;
443
444
  isNewPlacesAPI?: boolean;
444
445
  fields?: string;
446
+ /** Rendered after the results list, inside the container. */
447
+ children?: React.ReactNode;
445
448
  }
446
449
 
450
+ /**
451
+ * The methods the component actually exposes. It is deliberately not `&
452
+ * TextInput`: only these are implemented.
453
+ */
447
454
  export type GooglePlacesAutocompleteRef = {
448
455
  setAddressText(address: string): void;
449
456
  getAddressText(): string;
450
457
  getCurrentLocation(): void;
451
- } & TextInput;
458
+ blur(): void;
459
+ focus(): void;
460
+ isFocused(): boolean;
461
+ clear(): void;
462
+ };
452
463
 
453
464
  export const GooglePlacesAutocomplete: React.ForwardRefExoticComponent<
454
465
  React.PropsWithoutRef<GooglePlacesAutocompleteProps> &