moneymobile-react
Advanced tools
Comparing version 0.7.2-beta to 0.7.3-beta
@@ -18,5 +18,6 @@ 'use strict'; | ||
color: React.PropTypes.string, | ||
currentLocation: React.PropTypes.object, | ||
googleMapsApiKey: React.PropTypes.string.isRequired, | ||
leftIcon: React.PropTypes.string, | ||
onCurrentLocationClick: React.PropTypes.func, | ||
onCurrentLocationClick: React.PropTypes.func.isRequired, | ||
onLeftIconClick: React.PropTypes.func, | ||
@@ -94,3 +95,7 @@ onSearchResultClick: React.PropTypes.func, | ||
_this3.setState({ showBody: false }); | ||
_this3.setState({ | ||
searchString: '', | ||
showBody: false | ||
}); | ||
_this3.props.onSearchResultClick(_extends({}, result, latLng)); | ||
@@ -106,3 +111,11 @@ }); | ||
if (this.props.onCurrentLocationClick) { | ||
if (this.props.currentLocation) { | ||
this.setState({ | ||
gettingLocation: false, | ||
searchString: '', | ||
showBody: false | ||
}); | ||
this.props.onCurrentLocationClick(this.props.currentLocation); | ||
} else { | ||
(function () { | ||
@@ -109,0 +122,0 @@ var failCurrentPosition = setTimeout(function () { |
{ | ||
"name": "moneymobile-react", | ||
"version": "0.7.2-beta", | ||
"version": "0.7.3-beta", | ||
"description": "Mobile specific UI components", | ||
@@ -5,0 +5,0 @@ "main": "dist/Index.js", |
@@ -12,5 +12,6 @@ const GoogleMapsAPI = require('google-maps'); | ||
color: React.PropTypes.string, | ||
currentLocation: React.PropTypes.object, | ||
googleMapsApiKey: React.PropTypes.string.isRequired, | ||
leftIcon: React.PropTypes.string, | ||
onCurrentLocationClick: React.PropTypes.func, | ||
onCurrentLocationClick: React.PropTypes.func.isRequired, | ||
onLeftIconClick: React.PropTypes.func, | ||
@@ -87,3 +88,7 @@ onSearchResultClick: React.PropTypes.func, | ||
this.setState({ showBody: false }); | ||
this.setState({ | ||
searchString: '', | ||
showBody: false | ||
}); | ||
this.props.onSearchResultClick(Object.assign({}, result, latLng)); | ||
@@ -98,3 +103,11 @@ }); | ||
_handleCurrentLocationClick () { | ||
if (this.props.onCurrentLocationClick) { | ||
if (this.props.currentLocation) { | ||
this.setState({ | ||
gettingLocation: false, | ||
searchString: '', | ||
showBody: false | ||
}); | ||
this.props.onCurrentLocationClick(this.props.currentLocation); | ||
} else { | ||
const failCurrentPosition = setTimeout(() => { | ||
@@ -101,0 +114,0 @@ this.props.onCurrentLocationClick(false); |
127378
3984