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

248
Views
Values are changing in loop but not passing to the function which i called in @click in vue

I've been trying to send values to a function through @click method but only the first value is passing and the other values are not passing.

<tr v-for="(m, i) in list.accounts" :key="i">
   <td class="border-top-0">
        <div class="custom-control custom-radio">
          <input
            type="radio"
            class="custom-control-input"
            name="accept_revoke"
            id="accept"
            value="1"
            :checked="list.acceptRevoke[m.id] == 1"
            @change="dialogConfirm(m.id)"
          />

          <label class="custom-control-label" for="accept">Yes ---{{m.id}}</label>
        </div>
        <div class="custom-control custom-radio">
          <input
            type="radio"
            class="custom-control-input"
            name="accept_revoke"
            id="revoke"
            value="0"
            :checked="list.acceptRevoke[m.id] == 0"
            @change="dialogConfirm(m.id)"
          />
          <label class="custom-control-label" for="revoke">No---{{m.id}}</label>
        </div>
      </td>
  </tr>

and in the above part where m.id changes for each iteration in ui but while passing the value to the dialogConfirm function it is always taking the value of list.accounts[0].id. i.e the first iteration value. i also checked the value receiving at the function dialogConfirm through console.log

dialogConfirm(id) {
  console.log("id",id)
}

Could someone help me on this, your help will be much appreciated, Thanks in adv.!!

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!