-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.2.6
Reproduction link
https://jsfiddle.net/psycketom/50wL7mdz/29927/
Steps to reproduce
- Component emits with multiple arguments for payload:
$emit('event', first, second, arbitrary)
, as per documentation. - Parent listens to the event via inline statement
@event="listener($event)"
. - Notice how listener does not get full payload, but only the first value.
What is expected?
Full event payload, either as an array or other means.
What is actually happening?
Only the first value is passed.
I ran into this by creating a list of components with v-for
, listening to an event and I had to pass index
parameter to the listener: @event="listener(index, $event)
.
Maybe my use case is meant to be solved differently (bound data attribute?!), if so, I wouldn't mind some guidance.
AndreKR, levu1709, kaasasolut, qarthandgi, jrigunawan and 9 more
Metadata
Metadata
Assignees
Labels
No labels