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

164
Views
Las diapositivas de Swiperjs no se deslizan correctamente

Estoy usando swiperjs y tengo dificultades para hacer las diapositivas, ya que no se ajustan a la siguiente diapositiva y no puedo obtener el índice activo de ellas. Este es mi código.
¿Dónde me estoy equivocando? Estoy usando TypeScript y Swiperjs versión 6.84 con el marco iónico.

 import 'swiper/components/navigation/navigation.min.css' import 'swiper/components/pagination/pagination.min.css' const pagination = { clickable: true, }; return ( <IonPage> <Swiper pagination={pagination} onBeforeSlideChangeStart={e => { setIndex(e.activeIndex) }}> <SwiperSlide > <item property={property} index={0} save={dispatch} activeIndex={index} /> </SwiperSlide> <SwiperSlide > <item 2 property={property} index={1} /> </SwiperSlide> <SwiperSlide > <item3 property={property} index={1} /> </SwiperSlide> </Swiper> <IonButton disabled={true} onClick={(e) => { e.preventDefault(); }} className={"next"} expand={"block"} > Save </IonButton> </IonPage> ); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Olvidé agregar ionContent para que las diapositivas no reaccionaran de la manera correcta. También tuve que agregar observar

 <IonPage> <IonContent fullscreen> <Swiper pagination={pagination} observeParents={true} observer={true} onBeforeSlideChangeStart={e => { setIndex(e.activeIndex) }}> <SwiperSlide > <item property={property} index={0} save={dispatch} activeIndex={index} /> </SwiperSlide> <SwiperSlide > <item 2 property={property} index={1} /> </SwiperSlide> <SwiperSlide > <item3 property={property} index={1} /> </SwiperSlide> </Swiper> <IonButton disabled={true} onClick={(e) => { e.preventDefault(); }} className={"next"} expand={"block"} > Save </IonButton> </IonContent> </IonPage>
about 4 years ago · Juan Pablo Isaza 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!