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.9 to 1.0.10

13

lib/index.js

@@ -45,3 +45,5 @@ 'use strict';

_props$componentRestr = _props.componentRestrictions,
componentRestrictions = _props$componentRestr === undefined ? {} : _props$componentRestr;
componentRestrictions = _props$componentRestr === undefined ? {} : _props$componentRestr,
_props$bounds = _props.bounds,
bounds = _props$bounds === undefined ? {} : _props$bounds;

@@ -51,3 +53,4 @@

types: types,
componentRestrictions: componentRestrictions
componentRestrictions: componentRestrictions,
bounds: bounds
});

@@ -71,3 +74,4 @@

componentRestrictions = _props2.componentRestrictions,
rest = _objectWithoutProperties(_props2, ['onPlaceSelected', 'types', 'componentRestrictions']);
bounds = _props2.bounds,
rest = _objectWithoutProperties(_props2, ['onPlaceSelected', 'types', 'componentRestrictions', 'bounds']);

@@ -90,3 +94,4 @@ return _react2.default.createElement(

types: _react.PropTypes.array,
componentRestrictions: _react.PropTypes.object
componentRestrictions: _react.PropTypes.object,
bounds: _react.PropTypes.object
};

@@ -93,0 +98,0 @@ exports.default = ReactGoogleAutocomplete;

{
"name": "react-google-autocomplete",
"version": "1.0.9",
"version": "1.0.10",
"description": "React component for google autocomplete.",

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

@@ -33,2 +33,3 @@ ## React google autocomplete

A [componentRestrictions](https://developers.google.com/maps/documentation/javascript/reference#ComponentRestrictions) prop by default is empty.
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.

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

componentRestrictions: PropTypes.object,
bounds: PropTypes.object,
}

@@ -17,3 +18,3 @@

componentDidMount() {
const { types=['(cities)'], componentRestrictions={} } = this.props;
const { types=['(cities)'], componentRestrictions={}, bounds={} } = this.props;

@@ -23,2 +24,3 @@ this.autocomplete = new google.maps.places.Autocomplete(this.refs.input, {

componentRestrictions,
bounds,
});

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

render() {
const {onPlaceSelected, types, componentRestrictions, ...rest} = this.props;
const {onPlaceSelected, types, componentRestrictions, bounds, ...rest} = this.props;

@@ -39,0 +41,0 @@ return (

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