How to pass updated local ref's value from "child" back to "parent" when the prop is an object. #12462
Unanswered
jiri-jiri
asked this question in
Help/Questions
Replies: 1 comment
-
In the Child component, you can pass multiple arguments to an event: $emit('update:data', item.index, $event.target.value) I added the index along with the user input. It can be received by the parent like so:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an array of objects (fetched from firebase database), which I pass as a prop from the parent component to its child. Now I want to be able to change the value of the input made in CHILD and update it in PARENT (to respect props-down” and “events-up” vue pattern). It is shown in the official documentation, but only for simple values. But I pass the prop data as an array of objects. I am very new to vue, so I would be very grateful if anybody would help me on the issue and give me an idea how to achieve this? I have tried something like in yellow boxes, but obviously it does not work. Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions