From 55a2f552e8fcf09d3f2d09ec119f5130f983cbb6 Mon Sep 17 00:00:00 2001 From: jkettmann Date: Sat, 25 Nov 2017 08:02:55 +0100 Subject: [PATCH] feat(StandaloneSearchBox): accept wrapped input (#709) --- src/macros/places/StandaloneSearchBox.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/macros/places/StandaloneSearchBox.jsx b/src/macros/places/StandaloneSearchBox.jsx index cae189d3..1134cb03 100644 --- a/src/macros/places/StandaloneSearchBox.jsx +++ b/src/macros/places/StandaloneSearchBox.jsx @@ -44,7 +44,9 @@ class SearchBox extends React.PureComponent { /* * @see https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox */ - const searchBox = new google.maps.places.SearchBox(element) + const searchBox = new google.maps.places.SearchBox( + element.querySelector('input') || element + ) construct(SearchBox.propTypes, updaterMap, this.props, searchBox) componentDidMount(this, searchBox, eventMap)