pespantelis / vue-typeahead

:mag: Typeahead component for Vue.js
http://pespantelis.github.io/vue-typeahead
MIT License
517 stars 98 forks source link

Allow a default resultset #73

Closed juanvillegas closed 2 years ago

juanvillegas commented 6 years ago

We had a use case where we wanted to display some results immediately after the control is selected by the user (ie: when @focus). So we added @focus="update" and adjusted the update() function as above. If minChars is 0, then the client may be expecting a default result set (like in our case). What do you think? I wanted to avoid introducing new variables (something like allowDefault) so I just found a way with minChars == 0.