Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle on change when selecting user from list? #119

Open
thanhnx-mor opened this issue Apr 14, 2020 · 6 comments
Open

How to handle on change when selecting user from list? #119

thanhnx-mor opened this issue Apr 14, 2020 · 6 comments

Comments

@thanhnx-mor
Copy link

thanhnx-mor commented Apr 14, 2020

Helllo Fritx.
I have a question, please let me know how can i handle a function to catch seleted item?
And is there anyway to custom a button close(x) the item in textarea?

Please support to me.
Thank you very much!
@fritx

fritx added a commit to coldemo/gallery.code that referenced this issue Apr 19, 2020
@fritx
Copy link
Owner

fritx commented Apr 19, 2020

Hi @thanhnx-mor

Sorry for the late reply

For the "custom a button close(x) the item",
pls see the demo (contenteditable div only for now):
https://coldemo.github.io/#/playground/vue-at-gh119.js

And for the "function to catch seleted item", you can write a RegExp to match,
as it's not yet supported in vue-at.
It's also been discussed in #8, #34

@thanhnx-mor
Copy link
Author

thanhnx-mor commented Apr 20, 2020

@fritx
Thank you for support.
I have another question, could you support to me?

When $emit('insert'),
how can i insert a tag element for this.
Ex: When i click choose a item, i want to insert v-model:
<a style="color: blue" uuid="123456789">item selected> </a>

@fritx
Copy link
Owner

fritx commented Apr 22, 2020

@thanhnx-mor I think you're meaning this
#55 - feature of custom styled tags (embeddedItem)

<at :members="members" name-key="name" v-model="html2">
  <!-- custom tag: avatars -->
  <span slot="embeddedItem" slot-scope="s">
    <span class="tag"><img class="avatar" :src="s.current.avatar">{{ s.current.name }}</span>
  </span>

  <!-- custom list: avatars -->
  <template slot="item" scope="s">
    <img class="avatar" :src="s.item.avatar">
    <span class="name" v-text="s.item.name"></span>
  </template>

  <div class="editor" contenteditable></div>
</at>

@thanhnx-mor
Copy link
Author

@fritx
Awesome!!!
You are my life saver
Sincerely thanks!

@thanhnx-mor
Copy link
Author

@fritx
Is this a bug?
I have a list: 10 item.
Items 1,2,3,4,5 ( front of top ) dropdown is ok.
But item 6,7,8,9,10 have trouble as above
https://media.giphy.com/media/S6CH39IuPcizTmDDrY/giphy.gif

@fritx
Copy link
Owner

fritx commented Apr 27, 2020

@thanhnx-mor looks like related to the popup layer, the position has problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants