I am facing an issue with dynamically rendered checkboxes through a v-for loop. I have set the reference equal to a checkbox-specific id, but when I try to access this reference[id] in mounted(), it returns undefined.
Here is the code snippet:
let id = this.$route.query[key];
console.log(id);
console.log(this.$refs);
console.log(this.$refs[id]);
Resulting Output:
https://i.stack.imgur.com/EOJBv.png
Can anyone shed some light on what might be causing this issue? The references are being printed and should exist since it's in the mounted() lifecycle hook. Changing the reference does not seem to solve the problem. Thank you for any help.