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

162
Views
two nested v-for loops of which the inner one shouldn’t display its element but is needed for getting class attributes

how would we solve having two nested v-for loops (elements), of which one is solely for getting class attributes and shouldn't display its div element? because it is of course displaying its element in each iteration and causing a break in the layout and displaying duplicated data because of those iterations

DESIRED OUTCOME: I need to be able to use values from an array, for the column width of the rendered values of a loop, as interpolation in the class attribute along with their corresponding rendered values.

live example: https://stackblitz.com/edit/vitejs-vite-kkzp2g?file=src/components/HelloNestedLoop.vue

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use a <template> tag instead of <div> for the outer element:

<template v-for="...">
  <div v-for="...">
  </div>
</template>
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!