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

Bug: Can't set the 'id' value/prop on the <input> element #24

Closed Giners closed 6 years ago

Giners commented 6 years ago

The docs say that the textFieldProps prop can be used to spread props onto the <TextField> component which is responsible for rendering the <input> element. See here: https://github.com/Giners/mui-places-autocomplete#textFieldProps

Per the Material-UI docs it says that providing the id prop will set the value of id on the rendered <input> element. See here: https://material-ui-next.com/api/text-field/

This doesn't appear to be working. Take this code snippet:

<MUIPlacesAutocomplete textFieldProps={{ id: 'my-cool-input-id' }} />

The value of id on the rendered <input> element is actually equal to mui-places-autocomplete-input and not my-cool-input-id.