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

177
Views
vue buefy table sort nested array

I have a 2d array i'm displaying in a table using buefy, normally when I want to sort a column on render I can simply add default-sort="field name" and it will sort for me. But because of the 2d nested array it doesn't seem to work. Has anyone done this before? I'm trying to sort the table by the last column's values.

<b-table
  :data="testArray"
  default-sort="quantity"
>
      <b-table-column label="Jan" v-slot="props">
        {{ props.row[1].quantity }}
      </b-table-column>
      .
      .
      .
      <b-table-column label="December" field="quantity" numeric v-slot="props">
        {{ props.row[11].quantity }}
      </b-table-column>
</b-table>

I have tried using just "quantity", i have also tried using the whole "props.row[11].quantity" but that doesn't also work. The table itself renders just fine however,

enter image description here

My actual dataset goes like this:

[
    [{quantity=0},...,{quantity=0}],
    [{quantity=333},....,{quantity=717}],
    .
    .
    .
    [{quantity=0},...,{quantity=0}],
]

Its an array of arrays containing json objects, note the objects dont only contain quantity, they have other fields im omitting for clarity

about 4 years ago · Juan Pablo Isaza
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!