fritx / vue-at

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

Add memberObj in @at event #50

Closed goldsteinr closed 6 years ago

goldsteinr commented 6 years ago

I added the possibility to get the member's array object instead of just the text.

Example: I want a user email and not only his name. With the handler now, we get the member obj to use any information we want. closes #49

goldsteinr commented 6 years ago

@fritx I updated the code with the requested changes!

goldsteinr commented 6 years ago

Yes, it seems a better way to write it, sorry about that hahaha

On Tue, 27 Mar 2018 at 01:10 Fritz Lin notifications@github.com wrote:

@fritx commented on this pull request.

In src/At.vue https://github.com/fritx/vue-at/pull/50#discussion_r177303488:

           }

});

  • this.$emit('at', memberObj);
  • this.$emit('at', memberObj)

Great, but I had thought what if we $emit('at', chunk, memberObj)

the memberObj as the third arg... lol

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fritx/vue-at/pull/50#pullrequestreview-107147639, or mute the thread https://github.com/notifications/unsubscribe-auth/AGlOf6hWMpa-HcjScEiz5TF9DuQCsEyRks5tibvHgaJpZM4S5H-6 .

-- Att, Ricardo Goldstein via iPhone

goldsteinr commented 6 years ago

@fritx just add the third argument.

fritx commented 6 years ago

@goldsteinr thanks for the PR, but I made some further changes:

<at @insert="handleInsert"></at>

methods: {
  handleInsert (item) { /* ... */ }
}
goldsteinr commented 6 years ago

@fritx cool :) can we get a release of it?