• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by Mark DS


28 Nov, 2024

Updated at 13 Dec, 2024

How to pass updated local ref's value from "child" back to "parent" when the prop is an object.

Screenshot 2024-11-24 at 20 45 22

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.