Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Get Swiper Instance from Slides component

$
0
0

@OrganGrindingMonkey wrote:

I’ve read through the documentation and it says that you can get an instance of the Swiper using getSwiper() => Promise.

I’m currently importing the Slider
import { (removed other imports...), IonSlides } from "@ionic/react";

and then using it in a React.FC.

return (
    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonTitle>Survey Name</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent>
        <IonSlides pager={true}>{questions}</IonSlides>
      </IonContent>
    </IonPage>
  );

I’m not sure where or how to get the instance to be able to control it programmatically?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>