darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

HowTo set a value from component parent? #173

Closed MuyBien closed 4 years ago

MuyBien commented 4 years ago

Hi,

I'm trying to use your component but I'm facing a problem: how to set a value from outside the component? The v-model is used for the filter input value...

Is there a way?

Thanks.

darrenjennings commented 4 years ago

not sure exactly what you are asking, but v-model is the value of the in <input /> so it can be used in the component parent:

  You are searching for {{ query }}
  <vue-autosuggest  v-model="query" ...
MuyBien commented 4 years ago

Sorry, I forgot how autocomplete works... I was more looking for a select with options load dynamically. Thanks for your answer ;)