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

183
Views
Delete blank rows from table
<tr v-for="(value, key) in this.object" :key="key">
  <div v-if="value.item1 != null">
    <td width="400" class="alnleft">{{value.item1}}</td>
    <td width="50" class="alnright">{{value.item2}}</td>
  </div>
</tr>

With the v-if I am omitting values to print in tr. But above code printing black tr and unnecessary space is getting created . Please suggest how to get rid of this

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You dont ever want to place a div as the child of a tr. You can prevent the div from being inserted by replacing it with template.

<tr v-for="(value, key) in this.object" :key="key">
    <template v-if="value.item1 != null">
        <td width="400" class="alnleft">{{value.item1}}</td>
        <td width="50" class="alnright">{{value.item2}}</td>
    </template>
</tr>

Does that fix your issue?

over 4 years ago · Santiago Trujillo 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!