matiastucci / vue-input-tag

:bookmark: Vue.js 2.0 Input Tag Component
https://tucci.me/vue-input-tag
MIT License
536 stars 135 forks source link

Add option to add tag on blur #56

Closed lsapan closed 6 years ago

lsapan commented 6 years ago

Hello! Thanks for this great library. I noticed that the input was ignoring the last tag added if the user simply left the input without hitting enter, etc. Obviously most users would notice that the tag doesn't look right, but some users assume that their typed text is also being included.

I added a prop called addTagOnBlur which, as the name suggests, adds the tag when the user moves on. I set it to false by default as to not break any current implementations, though I don't think it'd be too harmful to enable by default.

Thanks again for the library!

matiastucci commented 6 years ago

thanks! 👍