Skip to content

Conversation

@mankowitz
Copy link

I added an overwritable function called processItem that allows the user to process the mention before inserting it in the element

@fritx
Copy link
Owner

fritx commented Mar 25, 2018

@mankowitz good idea.

I guess a corresponding deleteMatch should be defined to use together with processItem??

 deleteMatch: { type: Function, default: (name, chunk, suffix) => { return chunk === name + suffix } },
@mankowitz
Copy link
Author

@fritx - Can you merge the processItem into the next build?

@fritx
Copy link
Owner

fritx commented Aug 28, 2018

@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 slot-scope in a separated commit and bump since it would no longer work with Vue 2.4.x

<at-ta :members="members" name-key="name" v-model="text">
<!-- custom: with avatars -->
<template slot="item" scope="s">
<template slot="item" slot-scope="s">
Copy link
Owner

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 😄

:class="isCur(index) && 'atwho-cur'"
:ref="isCur(index) && 'cur'"
:data-index="index"
:key="index"
Copy link
Owner

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
Copy link
Owner

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" 😨

Copy link
Author

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?

Copy link
Owner

@fritx fritx Sep 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my bad

Copy link
Owner

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.

@fritx
Copy link
Owner

fritx commented Sep 6, 2018

@mankowitz i'm sorry you have deleted the source of this PR and
also there are some conflicts in it that I can not merge it right now.

@fritx fritx added the declined label Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants