I am using VueJS and I intend to generate an animation in a list within a table, I want that when adding (doing the push) or eliminating (splice) an animation is generated inside the table.
Try transition-group but I did not get what I wanted.
My code is as follows, I am using VueJS, Bootstrap 4 and Animatecss
<template>
<thead class=" wow fadeIn animated">
<tr>
<th class="w-30">Name</th>
<th class="w-10"></th>
</tr>
</thead>
<transition-group name="bounceInUp" tag="tbody" class="wow animated" >
<tr v-for="(product,index) in products" :key="index"
>
<td class="w-30">{{ product.name }}</td>
<td class="w-10">
<a class="btn-floating btn-sm btn-danger"
@click="deleteItem(index)">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
</transition-group>
</template>
<script>
export default{
methods :{
addItem(){
this.products.push = {name:'Hello World'}
}
deleteItem(index){
this.products.splice(index, 1);
}
}
}
</script>