-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Multiple arguments in custom event with a modifier are not passed to handler #10867
Labels
Comments
As a workaround you can use this version <component @emission.once="hearEmission('extra', ...arguments)">with extras, incomplete data</component> The first one should be: on: {
"~emission": hearEmission
} The second one shouldn't change and the last one might be a bit more complicated as there should be quite a few edge cases but if we use an |
Thanks for the quick response and for the link |
despreston
added a commit
to despreston/vue
that referenced
this issue
Dec 27, 2019
…vuejs#10867) Pass full parent argument list to the event handler when there are event modifiers present.
12 tasks
posva
pushed a commit
that referenced
this issue
Sep 21, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.6.10
Reproduction link
https://jsfiddle.net/50wL7mdz/30115/
Steps to reproduce
Add a modifier to one of the event listeners. e.g. @emission.once
What is expected?
That all arguments will be passed to the function
What is actually happening?
Only the first argument is passed
My guess is that it lies in the template compiler which creates a function($event){...} and calling the handler with $event instead of ...arguments?
The text was updated successfully, but these errors were encountered: