Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-google-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-autocomplete - npm Package Compare versions

Comparing version 1.0.18 to 1.1.0

10

lib/index.js

@@ -50,7 +50,10 @@ 'use strict';

componentRestrictions = _props.componentRestrictions,
bounds = _props.bounds;
bounds = _props.bounds,
_props$fields = _props.fields,
fields = _props$fields === undefined ? ["address_components", "geometry.location", "place_id", "formatted_address"] : _props$fields;
var config = {
types: types,
bounds: bounds
bounds: bounds,
fields: fields
};

@@ -122,3 +125,4 @@

componentRestrictions: _propTypes2.default.object,
bounds: _propTypes2.default.object
bounds: _propTypes2.default.object,
fields: _propTypes2.default.array
};

@@ -125,0 +129,0 @@ exports.default = ReactGoogleAutocomplete;

{
"name": "react-google-autocomplete",
"version": "1.0.18",
"version": "1.1.0",
"description": "React component for google autocomplete.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,5 +9,5 @@ ## React google autocomplete

You also have to include google autocomplete link api in your app. Somewhere in index.html or somwehrer else.
You also have to include google autocomplete link api in your app. Somewhere in index.html or somwhere else.
```
```html
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=[YOUR_API_KEY]&libraries=places"></script>

@@ -18,3 +18,3 @@ ```

```
```js
import Autocomplete from 'react-google-autocomplete';

@@ -36,3 +36,3 @@

A [bounds](https://developers.google.com/maps/documentation/javascript/reference#AutocompleteOptions) prop by default is empty.
You also can pass any props you want to the final input.
You also can pass any props you want to the final input. You can also set [fields](https://developers.google.com/maps/documentation/javascript/reference/places-service#PlaceResult) prop if you need extra information, now it defaults to basic data in order to control expenses.

@@ -39,0 +39,0 @@ ## Contribution

@@ -10,2 +10,3 @@ import React from 'react';

bounds: PropTypes.object,
fields: PropTypes.array,
}

@@ -20,6 +21,12 @@

componentDidMount() {
const { types=['(cities)'], componentRestrictions, bounds, } = this.props;
const {
types=['(cities)'],
componentRestrictions,
bounds,
fields = ["address_components", "geometry.location", "place_id", "formatted_address"]
} = this.props;
const config = {
types,
bounds,
fields,
};

@@ -26,0 +33,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc