Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Vuetify v-data-table add complex data

i am working on v-data-table. I couldn't figure out how to process the information from the backend. Could you help?

i tried this code but i get 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>

data from api

{
   "items": [
       {
          "name":"test",
          "id":1,
          "category":"test"
       }
   ],
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The data you receive from the API is stored in the items array

data(){
  return {
    items: []

If that is the case then you will need to do this:

v-data-table :items="items"

and not products like you have above.

Docs

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!