Vue-select: Reset text in box when it's not an option

Created on 16 Mar 2017  路  2Comments  路  Source: sagalbot/vue-select

If user doesn't select value from list and he enter some text. Then, he doesn't press enter, he move pointer to out of v-select place and click to other place. How can I remove text of v-select when he does that?

question support

All 2 comments

Hi @chingo89GE,

You can use the search:blur event. Here's an example on Codepen.

http://codepen.io/sagalbot/pen/xqPEVE

The only issue I see with this is that it wouldn't work well if you're dynamically creating v-selects in a v-for loop. In a future release, I will pass the vm instance as an argument in all events.

It works fine. Thank you, @sagalbot !

Was this page helpful?
0 / 5 - 0 ratings