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

304
Views
How to set matching array values with conditions using computed property in Vuejs?

 <div>
    <div v-for="box in boxes" :key="box.id">
      <BaseAccordian>
        <template v-slot:title>{{ box.name }}</template>
        <template v-slot:content>
          <div v-for="paint in paints" :key="paint.id" class="line">
            <div>
              <StatusComponent
                :box="box"
                :paint="paint"
                :matchingdata="matchingdata"
              />
              <!--only status like ok,not, medium to be printed on line accordingly -->
            </div>
          </div>
        </template>
      </BaseAccordian>
    </div>
  </div>

How to set matching array values in Vuejs?

In my code, I have 3 arrays called, boxes, paints, matchingdata. By using those arrays, i want to perfome the functionality.

After the checkbox is clicked, At present i am showing some information related to paints array

So i need to set the matching array value condition here like.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

you don't set matching array values with conditions using computed property in Vuejs, you can use method replace computed property

over 4 years ago · Santiago Trujillo Report

0

Do you want to update matchingdata inside your StatusComponent? This can be done by emits. There is a relevant example in the official vue documentation https://v3.vuejs.org/guide/list.html#v-for-with-a-component.

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!