-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add hook to selection #47
base: dev
Are you sure you want to change the base?
Conversation
@mankowitz good idea. I guess a corresponding deleteMatch: {
type: Function,
default: (name, chunk, suffix) => {
return chunk === name + suffix
}
}, |
@fritx - Can you merge the processItem into the next build? |
@mankowitz sorry.. but have a look at my previous comments :D The changes seem to be more than just one feature, I want things to be nailed in certain commits. And also, I would switch to |
@@ -18,7 +18,7 @@ | |||
|
|||
<at-ta :members="members" name-key="name" v-model="text"> | |||
<!-- custom: with avatars --> | |||
<template slot="item" scope="s"> | |||
<template slot="item" slot-scope="s"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed to use slot-scope
as a Vue upgrade, 👍
but I've been afraid it would break users that were still using older versions of Vue.
So I'd like to make such changes later in a major bump 😄
@@ -20,6 +20,7 @@ | |||
:class="isCur(index) && 'atwho-cur'" | |||
:ref="isCur(index) && 'cur'" | |||
:data-index="index" | |||
:key="index" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
processItem: { | ||
type: Function, | ||
default: (list, cur, suffix) => { | ||
return itemName(list[cur]) + suffix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afriad the itemName
here would be "not defined" 😨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn’t be undefind. I was able to use it. Maybe add a check first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mankowitz it should be not defined
'cause itemName
is defined in methods
not in top-level scope.
@mankowitz i'm sorry you have deleted the source of this PR and |
I added an overwritable function called
processItem
that allows the user to process the mention before inserting it in the element