Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When we click pagination, not loading previous or next slides in time #7011

Closed
5 of 6 tasks
MrSeaWave opened this issue Sep 5, 2023 · 1 comment · May be fixed by abhishekbedi/framework7#1, Aarod23/nys-site#1, wierza/Team-project#148 or TaylorBundy/swiper#4

Comments

@MrSeaWave
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-prev-next-slides-forked-dp5xyt?file=%2Fsrc%2FApp.jsx%3A27%2C11

Bug description

when we click on the specified pagination button, not loading the previous or next slides in time.
(the similar issue are: #6768, #6472

The code is:

export default function App() {
  let data = [...new Array(9)].map((_, i) => i);
  return (
    <>
      <Swiper
        slidesPerView={"auto"}
        loop={true}
        centeredSlides={true}
        spaceBetween={40}
        // loopedSlides={1}
        pagination={{
          clickable: true,
        }}
        navigation={true}
        modules={[Pagination, Navigation]}
        className="mySwiper"
      >
        {data.map((i) => {
          return (
            <SwiperSlide key={i}>
              <Slide id={i} />
            </SwiperSlide>
          );
        })}
      </Swiper>
    </>
  );
}

function Slide({ id }) {
  return (
    <div
      style={{
        background: "#cff",
        width: 400,
        height: 300,
        // transform: "scale(0.75)",
      }}
    >
      Slide {id}
    </div>
  );
}
swiperV10.mov

Expected Behavior

Previous/next slides appearing in time.

Actual Behavior

Previous/next slides not appearing in time.

Swiper version

^10.2.0 & V9

Platform/Target and Browser Versions

macOS Chrome 116.0.5845.140

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@MrSeaWave
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment