fritx / vue-at

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

Clicking suggested item removes prefix #67

Closed Wulthan closed 5 years ago

Wulthan commented 5 years ago

Using following code works fine until I click a suggested item instead of selecting it with ENTER

import AtTextarea from 'vue-at/dist/vue-at-textarea'
<at-textarea at="$" suffix="$ " :members="members">
            <text-area class="text-input"/>
</at-textarea>
members: ["John", "Ben"]

Using ENTER to select an item I get following example output: $John$

But when I select the member using a mouse click this output ends up in my text area: John$

For some reason it removes my "at" -Character and I can't figure out why.

Update: I just figured out that not only the "at"-Character is removed, everything before is removed: Foo bar turns into John$ instead of the expected Foo bar $John$

fritx commented 5 years ago

@Wulthan I can't reproduce the case you describe, but I think the suffix is kind of unstable.

Wulthan commented 5 years ago

@fritx Sorry for the late response. It was an internal issue and is fixed now.

fritx commented 5 years ago

@Wulthan cool, btw, what kind of internal issue?

HoaDevDn commented 5 years ago

@fritx and I encounter other problem Using ENTER to select an item I get following example output: @linda but my desired result is: linda Can you add this option to project?

Wulthan commented 5 years ago

@fritx Our drawing framework bugged out with the letter "$" in textfields. Fixing that allowed the textarea to behave like expected. So it was nothing on your side.