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

react-google-uni-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-uni-autocomplete - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

20

lib/index.js

@@ -18,2 +18,4 @@ 'use strict';

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -31,3 +33,3 @@

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ReactGoogleAutocomplete).call(this, props));
var _this = _possibleConstructorReturn(this, (ReactGoogleAutocomplete.__proto__ || Object.getPrototypeOf(ReactGoogleAutocomplete)).call(this, props));

@@ -41,4 +43,8 @@ _this.autocomplete = null;

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

@@ -58,2 +64,8 @@

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

@@ -64,3 +76,3 @@ 'div',

ref: 'input'
}, this.props))
}, rest))
);

@@ -83,3 +95,3 @@ }

var _this2 = _possibleConstructorReturn(this, Object.getPrototypeOf(ReactCustomGoogleAutocomplete).call(this, props));
var _this2 = _possibleConstructorReturn(this, (ReactCustomGoogleAutocomplete.__proto__ || Object.getPrototypeOf(ReactCustomGoogleAutocomplete)).call(this, props));

@@ -86,0 +98,0 @@ _this2.service = new google.maps.places.AutocompleteService();

2

package.json
{
"name": "react-google-uni-autocomplete",
"version": "1.0.2",
"version": "1.0.3",
"description": "React components for google autocomplete.",

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

@@ -14,4 +14,6 @@ import React, {PropTypes} from 'react';

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

@@ -29,2 +31,4 @@

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

@@ -34,3 +38,3 @@ <div>

ref="input"
{...this.props}
{...rest}
/>

@@ -37,0 +41,0 @@ </div>

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