Open debanjanpatra opened 4 years ago
@antoineguillaume I am trying to accomplish something similar (a user can update their existing address), but the computed solution you posted isn't working, and I think it's because my autocomplete component doesn't show to the user unless they click a button, and then it expands using v-if
, do you have any ideas on how to get the component to have a default value (just a string of text) without using the update()
method in mounted()
or without using the computed
solution you posted above?
Here is how I did it. I added the property "value" to the component and I linked it to a computed property in my view.
Here getType computed property is fixed for the example but in my case it's dynamic. Then, the way we want to display the address in the autocomplete field depends on that. And this.address object is your default address.
Hope this helps !