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

133
Vistas
When list rendering a component, nested component data doesn't update

The list rendering on the parent component runs perfectly

<stock-card
            class="col-sm"
            v-for="(stock, index) in formattedStocks"
            :stock="stock"
            :key="index"
          >
</stock-card>

On the nested component it only renders the first instance of the loop inside the modal component

<p class="card-text text-success">{{ stock["name"] }}$</p>
<button
  class="btn btn-danger rounded-pill"
  data-bs-toggle="modal"
  data-bs-target="#exampleModal"
  @click="buyStock(stock)"
>
  Activate Modal
</button>
<modal :modalTitle="stock['name']" />

I do have props on the both components

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The problem is with the way modal was used.

Generally, bootstrap modal is opened using data-bs-toggle="modal" and data-bs-target="modalInfo" attributes. data-bs-target is connected with id="modalInfo" in order to open and close the model.

In your case, for all three has the same data-bs-target and id, hence it was showing the same first modal in all the cases.

Here is the working example: Codesandbox

about 4 years ago · Juan Pablo Isaza Denunciar
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