mattzollinhofer/vue-typeahead-bootstrap

@hit is being called twice

Opened this issue · 1 comments

When I type some characters into the typeahead and click on a suggestion in the list, the @hit event is emitted twice - once with a string value and once with an object value:
image
image

This behaviour is undocumented, and looking at the repo tests, untested - I can see a test confirming that the @hit event was called, but not testing what the parameter is that gets passed, not that it was only emitted once (or twice, if that's the desired behaviour)

It also happens when typing characters and hitting enter. Am I seeing a bug due to my implementation?

I haven't tried to reproduce this yet, but aren't these two different @hits (one for VueTypeaheadBootstrap and one for VueTypeaheadBootstrapList)?