fritx / vue-at

At.js for Vue.
https://fritx.github.io/vue-at/
MIT License
529 stars 114 forks source link

Tagging someone and hitting enter makes tag disappear #106

Closed csantiago132 closed 5 years ago

csantiago132 commented 5 years ago

Hi and thank you for open sourcing this library! the issue i have is that if i tag someone and to not write anything else, it clears the tag when I hit enter, it works fine if i type anything else right after it

fritx commented 5 years ago

@csantiago132 I see, I think it is because you're using a textarea component <b-form-textarea>, there is some magic in it to interrupt the v-model binding. What is the <b-form-textarae> like?

Or, what version of vue-at do you use? Is it 2.5.0-beta.2, the latest? as it that we tried to fix integration with some 3rd-party libs like vuetify and element-ui: https://github.com/fritx/vue-at#used-with-3rd-party-libraries

fritx commented 5 years ago

@csantiago132 or you could try to move the v-model from the <textinput-component> to the component and see if it began to work:

<at-ta v-model="textInputValue">
  <b-form-textareat></b-form-textarea>
</at-ta>
csantiago132 commented 5 years ago

@fritx i think i figured out the issue; im loading the list of members async and that throws the component off, as of hitting enter, i also tweaked the code to handle this gracefully. i did some updates locally and it fixed all the issues, i can submit a PR for it to see what you think.

fritx commented 5 years ago

@csantiago132 cool it's pretty nice to have, thanks

csantiago132 commented 5 years ago

Closing since it’ll be solved. I’m looking into adding unit test for it as well unless you have them