diff --git a/CHANGELOG.md b/CHANGELOG.md index 959f6f21..a5112263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### 1.11.1 (2015-10-12) + + +#### Bug Fixes + +* upgrade code to 0.14, too ([c5f64d47](https://github.com/ubilabs/react-geosuggest/commit/c5f64d47befef21c620bee1db41e86ffc1592194)) + + ## 1.11.0 (2015-10-12) diff --git a/dist/react-geosuggest.js b/dist/react-geosuggest.js index 5b3c717d..8e9b78b7 100644 --- a/dist/react-geosuggest.js +++ b/dist/react-geosuggest.js @@ -76,7 +76,7 @@ var Geosuggest = _react2['default'].createClass({ * When the input got changed */ onInputChange: function onInputChange() { - var userInput = this.refs.geosuggestInput.getDOMNode().value; + var userInput = this.refs.geosuggestInput.value; this.setState({ userInput: userInput }, (function () { this.showSuggests(); diff --git a/dist/react-geosuggest.min.js b/dist/react-geosuggest.min.js index e37cbb79..00800472 100644 --- a/dist/react-geosuggest.min.js +++ b/dist/react-geosuggest.min.js @@ -1 +1 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Geosuggest=t()}}(function(){return function t(e,s,i){function n(o,g){if(!s[o]){if(!e[o]){var a="function"==typeof require&&require;if(!g&&a)return a(o,!0);if(u)return u(o,!0);var r=new Error("Cannot find module '"+o+"'");throw r.code="MODULE_NOT_FOUND",r}var c=s[o]={exports:{}};e[o][0].call(c.exports,function(t){var s=e[o][1][t];return n(s?s:t)},c,c.exports,t,e,s,i)}return s[o].exports}for(var u="function"==typeof require&&require,o=0;o=u;u++)this.state.suggests[u]===this.state.activeSuggest&&(n=s?u+1:u-1);this.state.activeSuggest||(n=s?0:e),n>=0&&e>=n&&(i=this.state.suggests[n]),this.setState({activeSuggest:i})},selectSuggest:function(t){return t||(t={label:this.state.userInput}),this.setState({isSuggestsHidden:!0,userInput:t.label}),t.location?void this.props.onSuggestSelect(t):void this.geocodeSuggest(t)},geocodeSuggest:function(t){this.state.geocoder.geocode({address:t.label},function(e,s){if(s===this.props.googleMaps.GeocoderStatus.OK){var i=e[0],n=i.geometry.location;t.gmaps=i,t.location={lat:n.lat(),lng:n.lng()},this.props.onSuggestSelect(t)}}.bind(this))},render:function(){return n["default"].createElement("div",{className:"geosuggest "+this.props.className,onClick:this.onClick},n["default"].createElement("input",{className:"geosuggest__input",ref:"geosuggestInput",type:"text",value:this.state.userInput,placeholder:this.props.placeholder,disabled:this.props.disabled,onKeyDown:this.onInputKeyDown,onChange:this.onInputChange,onFocus:this.onFocus,onBlur:this.hideSuggests}),n["default"].createElement("ul",{className:this.getSuggestsClasses()},this.getSuggestItems()))},getSuggestItems:function(){return this.state.suggests.map(function(t){var e=this.state.activeSuggest&&t.placeId===this.state.activeSuggest.placeId;return n["default"].createElement(o["default"],{key:t.placeId,suggest:t,isActive:e,onSuggestSelect:this.selectSuggest})}.bind(this))},getSuggestsClasses:function(){var t="geosuggest__suggests";return t+=this.state.isSuggestsHidden?" geosuggest__suggests--hidden":""}});e.exports=g},{"./GeosuggestItem":2}],2:[function(t,e){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var i=window.React,n=s(i),u=n["default"].createClass({displayName:"GeosuggestItem",getDefaultProps:function(){return{isActive:!1,suggest:{label:""},onSuggestSelect:function(){}}},onClick:function(t){t.preventDefault(),this.props.onSuggestSelect(this.props.suggest)},render:function(){return n["default"].createElement("li",{className:this.getSuggestClasses(),onClick:this.onClick},this.props.suggest.label)},getSuggestClasses:function(){var t=this.props.suggest.className,e="geosuggest-item";return e+=this.props.isActive?" geosuggest-item--active":"",e+=t?" "+t:""}});e.exports=u},{}]},{},[1])(1)}); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Geosuggest=t()}}(function(){return function t(e,s,i){function n(o,g){if(!s[o]){if(!e[o]){var a="function"==typeof require&&require;if(!g&&a)return a(o,!0);if(u)return u(o,!0);var r=new Error("Cannot find module '"+o+"'");throw r.code="MODULE_NOT_FOUND",r}var c=s[o]={exports:{}};e[o][0].call(c.exports,function(t){var s=e[o][1][t];return n(s?s:t)},c,c.exports,t,e,s,i)}return s[o].exports}for(var u="function"==typeof require&&require,o=0;o=u;u++)this.state.suggests[u]===this.state.activeSuggest&&(n=s?u+1:u-1);this.state.activeSuggest||(n=s?0:e),n>=0&&e>=n&&(i=this.state.suggests[n]),this.setState({activeSuggest:i})},selectSuggest:function(t){return t||(t={label:this.state.userInput}),this.setState({isSuggestsHidden:!0,userInput:t.label}),t.location?void this.props.onSuggestSelect(t):void this.geocodeSuggest(t)},geocodeSuggest:function(t){this.state.geocoder.geocode({address:t.label},function(e,s){if(s===this.props.googleMaps.GeocoderStatus.OK){var i=e[0],n=i.geometry.location;t.gmaps=i,t.location={lat:n.lat(),lng:n.lng()},this.props.onSuggestSelect(t)}}.bind(this))},render:function(){return n["default"].createElement("div",{className:"geosuggest "+this.props.className,onClick:this.onClick},n["default"].createElement("input",{className:"geosuggest__input",ref:"geosuggestInput",type:"text",value:this.state.userInput,placeholder:this.props.placeholder,disabled:this.props.disabled,onKeyDown:this.onInputKeyDown,onChange:this.onInputChange,onFocus:this.onFocus,onBlur:this.hideSuggests}),n["default"].createElement("ul",{className:this.getSuggestsClasses()},this.getSuggestItems()))},getSuggestItems:function(){return this.state.suggests.map(function(t){var e=this.state.activeSuggest&&t.placeId===this.state.activeSuggest.placeId;return n["default"].createElement(o["default"],{key:t.placeId,suggest:t,isActive:e,onSuggestSelect:this.selectSuggest})}.bind(this))},getSuggestsClasses:function(){var t="geosuggest__suggests";return t+=this.state.isSuggestsHidden?" geosuggest__suggests--hidden":""}});e.exports=g},{"./GeosuggestItem":2}],2:[function(t,e){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var i=window.React,n=s(i),u=n["default"].createClass({displayName:"GeosuggestItem",getDefaultProps:function(){return{isActive:!1,suggest:{label:""},onSuggestSelect:function(){}}},onClick:function(t){t.preventDefault(),this.props.onSuggestSelect(this.props.suggest)},render:function(){return n["default"].createElement("li",{className:this.getSuggestClasses(),onClick:this.onClick},this.props.suggest.label)},getSuggestClasses:function(){var t=this.props.suggest.className,e="geosuggest-item";return e+=this.props.isActive?" geosuggest-item--active":"",e+=t?" "+t:""}});e.exports=u},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/package.json b/package.json index 119fb5ec..7a5011fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-geosuggest", - "version": "1.11.0", + "version": "1.11.1", "description": "A React autosuggest for the Google Maps Places API.", "main": "module/Geosuggest.js", "author": "Robert Katzki ",