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.11 to 1.0.12

15

lib/index.js

@@ -44,13 +44,16 @@ 'use strict';

types = _props$types === undefined ? ['(cities)'] : _props$types,
_props$componentRestr = _props.componentRestrictions,
componentRestrictions = _props$componentRestr === undefined ? {} : _props$componentRestr,
componentRestrictions = _props.componentRestrictions,
bounds = _props.bounds;
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, {
var config = {
types: types,
componentRestrictions: componentRestrictions,
bounds: bounds
});
};
if (componentRestrictions) {
config.componentRestrictions = componentRestrictions;
}
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, config);
this.autocomplete.addListener('place_changed', this.onSelected.bind(this));

@@ -57,0 +60,0 @@ }

2

package.json
{
"name": "react-google-autocomplete",
"version": "1.0.11",
"version": "1.0.12",
"description": "React component for google autocomplete.",

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

@@ -17,10 +17,14 @@ import React, {PropTypes} from 'react';

componentDidMount() {
const { types=['(cities)'], componentRestrictions={}, bounds, } = this.props;
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, {
const { types=['(cities)'], componentRestrictions, bounds, } = this.props;
const config = {
types,
componentRestrictions,
bounds,
});
};
if (componentRestrictions) {
config.componentRestrictions = componentRestrictions;
}
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, config);
this.autocomplete.addListener('place_changed', this.onSelected.bind(this));

@@ -27,0 +31,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