fritx / vue-at

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

Not selecting at Click #32

Closed rskinnerc closed 2 years ago

rskinnerc commented 6 years ago

Hi.

I'm using vue-at textarea which works fine until the point where I click an item from the showed up list. In that moment, the clicked item does not get selected. Any idea why it could be happening?

fritx commented 6 years ago

@VetDev what was your operating system and browser?

fritx commented 6 years ago

https://fritx.github.io/vue-at/#/en/textarea Does the textarea demo work on your side?

iadambrown commented 6 years ago

For me, it seems to be when using v-model to bind a value to the textarea (e.g. v-model="body"). Switching this to v-text="body" allows selection of items from the list which then appear in the textarea, however when saving the form that the textarea is in, the body value hasn't been updated since it's no longer bound to the textarea...

iadambrown commented 6 years ago

FYI the demo above does work for me - is it using v-model or v-text? Or just a hard-coded value within the textarea?

iadambrown commented 6 years ago

Just saw in another issue that v-model isn't supported yet (https://github.com/fritx/vue-at/issues/29#issuecomment-349206886) :)

fritx commented 6 years ago

@iadambrown @VetDev yeah, v-model is not supported yet, but now I'm very interested in landing it: <at v-model="text"></a>??

iadambrown commented 6 years ago

If you can get v-model working, that would be great! I switched to at.js (temporarily) solely because of that one drawback, though it feels gross to need jquery as a dep, just for that one library... <at v-model="body"></at> would be very, very welcome in my current project ;)

jakedevsquad commented 6 years ago

Has this issue with clicking been resolved yet? I am using the 2.4.0 beta with v-model support and clicking does not select the item... Any help would be great!

fritx commented 6 years ago

@jakedevsquad @iadambrown v-model had been supported, and you should follow the docs usage like https://fritx.github.io/vue-at/#/en/vmodel

<at v-model="html">
  <div contenteditable></div>
</at>

<at-ta v-model="text">
  <textarea></textarea>
</at-ta>