Tintef / react-google-places-autocomplete

React Google Places Autocomplete input -- fully customizable
https://tintef.github.io/react-google-places-autocomplete
MIT License
378 stars 162 forks source link

IsDisabled field in selectprops disables the field but also hides the data #309

Closed anagharajan95 closed 1 year ago

anagharajan95 commented 2 years ago

I am trying to use isDisabled props for <> component where I need the select box to be disabled/readonly but if any value is already selected that need to be rendered in the selectbox wih disabled style...But currently the box is disabled but the value also gets hidden. image

But when i inspect the component the value is seen in the inspect element section image Can anyone please help to understand why this issue happens

Tintef commented 1 year ago

What's locationData there? selectProps are props for the underlying react-select component as explained here.

As you are passing down an onChange it looks like you want to use it as a controlled input, please read the docs about how to do it.