mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
docs - fix outdated method on SearchBox example (#343)
This commit is contained in:
parent
bb59c46ef4
commit
d83352f16b
3
API.md
3
API.md
@ -293,7 +293,8 @@ export default class SearchBox extends React.Component {
|
||||
this.searchBox.addListener('places_changed', this.onPlacesChanged);
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.searchBox.removeListener('places_changed', this.onPlacesChanged);
|
||||
// https://developers.google.com/maps/documentation/javascript/events#removing
|
||||
google.maps.event.clearInstanceListeners(this.searchBox);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user