alexurquhart / vue-bootstrap-typeahead

An autocomplete/typeahead component for Vue 2 and Bootstrap 4
https://alexurquhart.github.io/vue-bootstrap-typeahead/
MIT License
206 stars 157 forks source link

fix: check for value at start and watch for external changes #21

Open raymondmuller opened 6 years ago

raymondmuller commented 6 years ago

Got this issue that you can't preset the value. This fixes it.

Demonstrated in this pen: https://codepen.io/raymondmuller/pen/pxgXzd

the value of 'query' is 'test', however the input does not reflect it.

also watching the value afterwards to make it respond to external changes

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 39


Totals Coverage Status
Change from base Build 38: 0.3%
Covered Lines: 48
Relevant Lines: 69

💛 - Coveralls
Centro1993 commented 5 years ago

Please implement ASAP, much needed!

brweber2 commented 5 years ago

Please accept and release new minor version. Thanks!

rlightner commented 5 years ago

Please accept this PR!

siamkreative commented 5 years ago

Can this get merged?

dallasbeek commented 5 years ago

ran into issue when binding the autocomplete in a vue for loop and dynamically adding a new record to my array on button click. Changing the below corrected.

inputValue: this.value
to
inputValue: this.value || ''
siamkreative commented 5 years ago

@alexurquhart Do you have time to review this PR?

mattzollinhofer commented 4 years ago

Thanks for looking into this and submitting!

I merged in functionality that I think meets this need here: mattzollinhofer@e26ad49.

You can use the functionality under the forked project: https://www.npmjs.com/package/vue-typeahead-bootstrap or https://github.com/mattzollinhofer/vue-typeahead-bootstrap.

Hope this helps anyone who needs this functionality going forward! Let me know if that fix doesn't fix this issue.