<template>
<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
v-if="
matchingdata.some(
(m) => m.boxid == box.boxid && m.paintid == paint.paintid
)
"
>
<StatusComponent
:box="box"
:paint="paint"
:matchingdata="matchingdata"
/>
</div>
<!-- <div v-else>no data found</div> -->
</div>
</template>
</BaseAccordian>
</div>
</div>
</template>
When a checkbox is clicked, relevant data from the box and paint array is loaded by checking in the matching data array.
I would like to display a message saying "no data found" if no data is found when a checkbox is clicked.
The issue with the current code is that only a few data is displayed when the v-if is placed at the top and v-for and v-else data at the bottom.