I am currently working on the v-data-table component and I'm having trouble processing information from the backend. Can anyone provide some assistance?
I attempted to use this code, but I keep receiving the error: "vue.runtime.esm.js:1897 TypeError: this.items.slice is not a function"
<v-data-table :headers="headers" :items="products" class="elevation-1" :search="search">
<template slot="item" slot-scope="props">
<tr>
<td>{{ props.item.id }}</td>
<td class="text-xs-right">{{ props.item.name }}</td>
<td class="text-xs-right">{{ props.item.id }}</td>
<td class="text-xs-right">{{ props.item.category}}</td>
....
<v-btn icon class="mx-0" @click="editItem(props.item)">
<v-icon class="mx-0 primary--text white--text">edit</v-icon>
</v-btn>
<v-btn icon class="mx-0" @click="deleteItem(props.item)">
<v-icon class="mx-0 red--text white--text">delete</v-icon>
</v-btn>
</td>
</tr>
</template>
Here is the data from the API:
{
"items": [
{
"name":"test",
"id":1,
"category":"test"
}
],
}