Update API.md (#403)

fix searchbox example
This commit is contained in:
Tim 2017-12-21 00:04:05 +03:00 committed by Michael Diego
parent e344c3c8f4
commit bb59c46ef4

3
API.md
View File

@ -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);
}