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

526
Vistas
How to dynamically update Swiper in response to new Slide Array?

I want to retrieve data dynamically and insert it as a slide in my slider. I am using Swiper to do this. However, I run into problems because Swiper does not update as the number of slides in the array increases. Only when I reinitialize Swiper after the new slides are available does Swiper find the new array. I have found the observer parameter to reinitialize Swiper when the children are updated. However, I can not set this to active, i.e. observer:true is not possible.

How do I activate the observer Parameter. I have tried the following approach?

        <Swiper
          slidesPerView={1.2}
          spaceBetween={10}
          loop={false}
          centeredSlides={true}
          observer={true}
          observeParents={true}
          pagination={{
            clickable: true,
          }}
          onSlideChange={
            (swiper) =>
              handleIndexChange(swiper.activeIndex)
          }
          onSwiper={(swiper) => console.log(swiper)}
        >
          {ShowItems}
        </Swiper>
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