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

Allow catch close menu event. #8

Closed
Rubon72 opened this issue Jun 7, 2020 · 5 comments · Fixed by #30
Closed

Allow catch close menu event. #8

Rubon72 opened this issue Jun 7, 2020 · 5 comments · Fixed by #30

Comments

@Rubon72
Copy link

Rubon72 commented Jun 7, 2020

Make @close="onCloseMentionMenu" like @OPEN="onOpenMentionMenu"

@Rubon72
Copy link
Author

Rubon72 commented Jun 7, 2020

closeMenu () { this.oldKey = this.key this.key = null this.$emit('close') },

add row this.$emit('close') to closeMenu method

@Rubon72
Copy link
Author

Rubon72 commented Jun 8, 2020

@Akryum I will be happy if you add this as soon as possible, thank you

@quanghm27
Copy link

@Rubon72: Why you need this event, can you share your case ?

@amdp
Copy link

amdp commented Aug 22, 2020

Hi, I guess the event handling is needed as when you mention someone, you need some notification to happen. By now, the idea I have to implement it when someone is selected is to populate an array when the selection happens, and when the text is completed the array is used to notify. The handling of such an event from inside the comment where the @ is doesn't seem to be so straightforward.

@milosbjelcevic
Copy link

Example for it could be that you want to type message and on key press ENTER you want to send it and if you type @ and typing some user name and press enter, it will send the message as well. With onClose you could at least make conditions. @quanghm27 @amdp

Akryum added a commit that referenced this issue Dec 28, 2020
* Add close event and tests

* Fix test where key is nulled after clear close

* fix: don't emit close if already closed

Co-authored-by: Guillaume Chau <guillaume.b.chau@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants