Selected event is emitted twice
I got a problem which I've also tested on https://romainsimon.github.io/vue-simple-search-dropdown/
When you select an entry with left clicking your mouse, "X has been selected" is printed twice. Therefore I assume that (for whatever reason) the select event is emitted twice. Is there an easy fix for that?
It looks like the selected event gets emitted two places in the code:
- When the text input loses focus (exit method gets called which emits selected)
- When a dropdown option is clicked
I ended up just copying the component into my project and removing the line that emits in exit() and that fixed it for my use case at least: https://github.com/romainsimon/vue-simple-search-dropdown/blob/master/src/Dropdown.vue#L106
Thanks man, I ended up fixing it the same way as you - removing the emit line in exit()