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.7 to 1.0.8

27

lib/index.js

@@ -41,8 +41,12 @@ 'use strict';

value: function componentDidMount() {
var _props$types = this.props.types;
var types = _props$types === undefined ? ['(cities)'] : _props$types;
var _props = this.props,
_props$types = _props.types,
types = _props$types === undefined ? ['(cities)'] : _props$types,
_props$componentRestr = _props.componentRestrictions,
componentRestrictions = _props$componentRestr === undefined ? {} : _props$componentRestr;
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, {
types: types
types: types,
componentRestrictions: componentRestrictions
});

@@ -62,8 +66,7 @@

value: function render() {
var _props = this.props;
var onPlaceSelected = _props.onPlaceSelected;
var types = _props.types;
var _props2 = this.props,
onPlaceSelected = _props2.onPlaceSelected,
types = _props2.types,
rest = _objectWithoutProperties(_props2, ['onPlaceSelected', 'types']);
var rest = _objectWithoutProperties(_props, ['onPlaceSelected', 'types']);
return _react2.default.createElement(

@@ -83,3 +86,5 @@ 'div',

ReactGoogleAutocomplete.propTypes = {
onPlaceSelected: _react.PropTypes.func
onPlaceSelected: _react.PropTypes.func,
types: _react.PropTypes.array,
componentRestrictions: _react.PropTypes.object
};

@@ -105,4 +110,4 @@ exports.default = ReactGoogleAutocomplete;

var _props$types2 = this.props.types;
var types = _props$types2 === undefined ? ['(cities)'] : _props$types2;
var _props$types2 = this.props.types,
types = _props$types2 === undefined ? ['(cities)'] : _props$types2;

@@ -109,0 +114,0 @@

{
"name": "react-google-autocomplete",
"version": "1.0.7",
"version": "1.0.8",
"description": "React component for google autocomplete.",

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

@@ -7,2 +7,3 @@ import React, {PropTypes} from 'react';

types: PropTypes.array,
componentRestrictions: PropTypes.object,
}

@@ -16,6 +17,7 @@

componentDidMount() {
const { types=['(cities)'] } = this.props;
const { types=['(cities)'], componentRestrictions={} } = this.props;
this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, {
types,
componentRestrictions,
});

@@ -22,0 +24,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