Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda