@react-google-maps/api
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -93,3 +93,3 @@ "use strict"; | ||
ref: _this.containerElement | ||
}, _react.default.Children.only(_this.props.children)); | ||
}, _react.Children.only(_this.props.children)); | ||
}); | ||
@@ -96,0 +96,0 @@ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "getBounds", function () { |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.DirectionsServicePropTypes = exports.DirectionsRendererPropTypes = exports.LoadScriptPropTypes = exports.GoogleMapPropTypes = exports.GroundOverlayPropTypes = exports.TrafficLayerPropTypes = exports.BicyclingLayerPropTypes = exports.MarkerWithLabelPropTypes = exports.MarkerClusterPropTypes = exports.MarkerPropTypes = exports.StreetViewPanoramaPropTypes = exports.HeatmapLayerPropTypes = exports.InfoBoxPropTypes = exports.InfoWindowPropTypes = exports.DrawingManagerPropTypes = exports.SearchBoxPropTypes = exports.AutocompletePropTypes = exports.ImageMapTypePropTypes = exports.FusionTablesLayerPropTypes = exports.KmlLayerPropTypes = exports.OverlayViewPropTypes = exports.DataPropTypes = exports.CirclePropTypes = exports.RectanglePropTypes = exports.PolygonPropTypes = exports.PolylinePropTypes = void 0; | ||
exports.DirectionsServicePropTypes = exports.DirectionsRendererPropTypes = exports.LoadScriptPropTypes = exports.GoogleMapPropTypes = exports.GroundOverlayPropTypes = exports.TrafficLayerPropTypes = exports.BicyclingLayerPropTypes = exports.MarkerWithLabelPropTypes = exports.MarkerClusterPropTypes = exports.MarkerPropTypes = exports.StreetViewPanoramaPropTypes = exports.HeatmapLayerPropTypes = exports.InfoBoxPropTypes = exports.InfoWindowPropTypes = exports.DrawingManagerPropTypes = exports.StandaloneSearchBoxPropTypes = exports.SearchBoxPropTypes = exports.AutocompletePropTypes = exports.ImageMapTypePropTypes = exports.FusionTablesLayerPropTypes = exports.KmlLayerPropTypes = exports.OverlayViewPropTypes = exports.DataPropTypes = exports.CirclePropTypes = exports.RectanglePropTypes = exports.PolygonPropTypes = exports.PolylinePropTypes = void 0; | ||
@@ -808,2 +808,11 @@ var _propTypes = _interopRequireDefault(require("prop-types")); | ||
exports.SearchBoxPropTypes = SearchBoxPropTypes; | ||
var StandaloneSearchBoxPropTypes = { | ||
options: _propTypes.default.shape(SearchBoxOptionsInterface), | ||
children: _propTypes.default.node, | ||
controlPosition: _propTypes.default.number, | ||
bounds: _propTypes.default.any, | ||
// TODO | ||
onPlacesChanged: _propTypes.default.func | ||
}; | ||
exports.StandaloneSearchBoxPropTypes = StandaloneSearchBoxPropTypes; | ||
var DrawingManagerPropTypes = { | ||
@@ -810,0 +819,0 @@ options: _propTypes.default.shape(DrawingManagerOptionsInterface), |
{ | ||
"name": "@react-google-maps/api", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "React.js Google Maps API integration", | ||
@@ -174,3 +174,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "69da2d8fcb823ef9a23dff72c298625665ca91d3" | ||
"gitHead": "babe13037311a3265bbea5d172aa58e7966a6e3f" | ||
} |
/* global google */ | ||
import React, { PureComponent } from 'react' | ||
import React, { | ||
PureComponent, | ||
Children | ||
} from 'react' | ||
import invariant from 'invariant' | ||
@@ -9,3 +12,3 @@ | ||
import { SearchBoxPropTypes } from '../../proptypes' | ||
import { StandaloneSearchBoxPropTypes } from '../../proptypes' | ||
@@ -23,3 +26,3 @@ const eventMap = { | ||
class StandaloneSearchBox extends PureComponent { | ||
static propTypes = SearchBoxPropTypes | ||
static propTypes = StandaloneSearchBoxPropTypes | ||
@@ -84,5 +87,11 @@ static contextType = MapContext | ||
render = () => { | ||
return <div ref={this.containerElement}>{React.Children.only(this.props.children)}</div> | ||
} | ||
render = () => ( | ||
<div | ||
ref={this.containerElement} | ||
> | ||
{ | ||
Children.only(this.props.children) | ||
} | ||
</div> | ||
) | ||
@@ -89,0 +98,0 @@ getBounds = () => this.state.searchBox.getBounds() |
@@ -1434,2 +1434,12 @@ import PropTypes from 'prop-types' | ||
export const StandaloneSearchBoxPropTypes = { | ||
options: PropTypes.shape( | ||
SearchBoxOptionsInterface | ||
), | ||
children: PropTypes.node, | ||
controlPosition: PropTypes.number, | ||
bounds: PropTypes.any, // TODO | ||
onPlacesChanged: PropTypes.func | ||
} | ||
export const DrawingManagerPropTypes = { | ||
@@ -1436,0 +1446,0 @@ options: PropTypes.shape( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
655004
9801