Here is my table markup:
<table class="table table-condensed">
<thead>
<tr>
<th>id</th>
<th>task</th>
<th>date</th>
</tr>
</thead>
<tbody>
<tr v-for="row in tasks">
<td span @mouseover="showButtonFunction" @mouseleave="hideButtonFunction">{{row.id}}</td>
<td span @mouseover="showButtonFunction" @mouseleave="hideButtonFunction">{{row.text}}<button v-if="showBatton">Test</button></td>
<td span @mouseover="showButtonFunction" @mouseleave="hideButtonFunction">{{row.date_current}}</td>
<td span @mouseover="showButtonFunction" @mouseleave="hideButtonFunction"><button v-if="showBatton">Test</button></td>
</tr>
</tbody>
</table>
The issue I am facing is that the button appears on all visible lines instead of just the line where the mouse is hovering.
Here is the script section:
data: {
showBatton: false,
},
showButtonFunction() {
console.log("test");
this.showBatton = true;
},
hideButtonFunction() {
this.showBatton = false;
}
Any ideas on how to rectify this behavior?