Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@hit is being called twice #150

Open
AbrahamBrookes opened this issue Jul 22, 2022 · 1 comment
Open

@hit is being called twice #150

AbrahamBrookes opened this issue Jul 22, 2022 · 1 comment

Comments

@AbrahamBrookes
Copy link

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?

@drikusroor
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants