Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

243
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda