Giners / mui-places-autocomplete

Google Material Design (Material-UI) styled React component using Google Maps Places Autocomplete
MIT License
34 stars 26 forks source link

New: Expose 'createAutocompleteRequest' prop (fixes #26) #27

Closed Giners closed 6 years ago

Giners commented 6 years ago

This PR will expose a new prop on <MUIPlacesAutocomplete> named createAutocompleteRequest. Consumers of <MUIPlacesAutocomplete> that wish to have greater control over the types of suggestions returned to us (their users) from the Google Places API Web Service can provide a function to the createAutocompleteRequest prop.

The function provided to the createAutocompleteRequest prop is called each time a request for suggestions from Google Places is made. It ought to return an object as documented by the Google Maps API docs: https://developers.google.com/maps/documentation/javascript/reference#AutocompletionRequest

This PR provides the functionality in feature request #26.