sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

Event @search is fire when selecting an item #1590

Closed romain130492 closed 2 years ago

romain130492 commented 2 years ago

Please respect maintainers time by filling in these sections. Your issue will likely be closed without this information.

Describe the bug A clear and concise description of what the bug is. When using the event @search, it should I think only be emitted when the user inputs some text. However, it's also emitted when the user selects an item from the dropdown.

Reproduction Link A link to a reproduction of the bug. This is a huge help.

Steps To Reproduce Outline the steps to reproduce the bug.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

sagalbot commented 2 years ago

It fires because the search text is cleared when an option is selected, so search event is triggered with an empty string.