react-id-swiper icon indicating copy to clipboard operation
react-id-swiper copied to clipboard

pagination render empty tag

Open seyyed-sina opened this issue 4 years ago • 6 comments

using

swiper: ^6.1.1,
react-id-swiper:  ^4.0.0

get nothing on pagination tag. It means it renders nothing in .pagination. Also, the fade effect does nothing.

here is my try:

// SlideShow.js
<Carousel
      options={{
        slidesPerView: 'auto',
        pagination: {
           el: '.swiper-pagination',
           clickable: true
       }
}}>
   {listCard.map((card) => {
    return ( 
      <div key={card.id} className={styles.cardWrapper}>
          <EventCard card={card} />
      </div>
    );
})}
</Carousel>
// Carousel.js
export const Carousel = ({ children, options }) => {
	const defaultOption = {
                effect: 'fade',
		shouldSwiperUpdate: true,
		rebuildOnUpdate: true,
		grabCursor: true,
		spaceBetween: 10
	};
	const sliderOption = Object.assign(defaultOption, options);

	return <Swiper {...sliderOption}>{children}</Swiper>;
};

seyyed-sina avatar Aug 09 '20 16:08 seyyed-sina

seems Swiper > 6.x.x already support React Component please check in here: https://swiperjs.com/react/ its work fine with the pagination

jackylo-hc avatar Aug 11 '20 14:08 jackylo-hc

thanks, @hclojacky, at last, I had to migrate to swiper/react

seyyed-sina avatar Aug 12 '20 15:08 seyyed-sina

Same issue for me, pagination no longer works since updating to react-id-swiper: 4.0.0

Quirksmode avatar Aug 22 '20 13:08 Quirksmode

Pagination has gone for me, poof ???

GaddMaster avatar Aug 24 '20 20:08 GaddMaster

I managed to fix the pagination by downgrading Swiper to version "5.4.5" as per this working example

https://codesandbox.io/s/pagination-dynamic-bullets-example-forked-rqu2q?file=/src/App.tsx

Quirksmode avatar Aug 26 '20 10:08 Quirksmode

@Quirksmode Did the job for me too !, until now that div was empty. I have a feeling ill move to swiper asap anyways but good patch for now

GaddMaster avatar Aug 28 '20 10:08 GaddMaster