Hi, first of all, I love the library! but i'm struggling to create a dynamic carrousel that appends / removes items in a list. I get errors for the items that do not exist yet in the new list. Is there a way to provide default values for new items?
<template>
<ul>
<Motion :values="children">
<div slot-scope="_children">
<div v-for="(child, index) in _children" :key="index">
<p>{{child.offset}}</p>
</div>
</div>
</Motion>
<button v-on:click="testPush">test Push</button>
<button v-on:click="test">test</button>
</ul>
</template>
<script lang="ts">
import { Motion } from "vue-motion"
export default {
components: {
Motion
},
data() {
return {
children: [{
offset: 0,
}],
}
},
methods: {
test() {
this.$data.children = [{offset: 100}, {offset: 200}]
},
testPush() {
this.$data.children.push({offset: 200})
}
}
}
</script>