mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
parent
e344c3c8f4
commit
bb59c46ef4
3
API.md
3
API.md
@ -272,6 +272,7 @@ render() {
|
||||
|
||||
```javascript
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
export default class SearchBox extends React.Component {
|
||||
static propTypes = {
|
||||
@ -287,7 +288,7 @@ export default class SearchBox extends React.Component {
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
var input = React.findDOMNode(this.refs.input);
|
||||
var input = ReactDOM.findDOMNode(this.refs.input);
|
||||
this.searchBox = new google.maps.places.SearchBox(input);
|
||||
this.searchBox.addListener('places_changed', this.onPlacesChanged);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user