I've come across a challenge in my Vue project with Firebase. I'm using v-for to fetch data from the Firebase database, and each item has a "description" value. I want to be able to expand and show only the description of the clicked item when users click anywhere on the table row (tr). However, the issue is that when I click on the tbody, all description values expand. How can I resolve this?
Here's my current code:
<tbody v-for="item in items" :key="item.id" @click="isClicked = !isClicked">
<tr>
<td>
{{item.name}}
</td>
<td>
{{item.surname}}
</td>
<td>
{{item.explanation}}
</td>
<td>
<span @click="isDelete(item)">X</span>
</td>
</tr>
<tr v-if="isClicked === true">
{{item.desc}}
</tr>
</tbody>
Thank you for any assistance provided.