<div>
<div v-for="box in boxes" :key="box.id">
<BaseAccordian>
<template v-slot:title>{{ box.name }}</template>
<template v-slot:content>
<div v-for="paint in paints" :key="paint.id" class="line">
<div>
<StatusComponent
:box="box"
:paint="paint"
:matchingdata="matchingdata"
/>
<!--only status like ok,not, medium to be printed on line accordingly -->
</div>
</div>
</template>
</BaseAccordian>
</div>
</div>
How to set matching array values in Vuejs?
In my code, I have 3 arrays called, boxes, paints, matchingdata. By using those arrays, i want to perfome the functionality.
After the checkbox is clicked, At present i am showing some information related to paints array
So i need to set the matching array value condition here like.
you don't set matching array values with conditions using computed property in Vuejs, you can use method replace computed property
Do you want to update matchingdata inside your StatusComponent? This can be done by emits. There is a relevant example in the official vue documentation https://v3.vuejs.org/guide/list.html#v-for-with-a-component.