-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
SwiperSlide is visible not working #5786
Comments
@emish89
|
I'm facing the same problem in Vue, and I'm adding the |
|
Swiper v9 comes with fully reworked and now different loop functionality. If you have similar issues in Swiper 9, open a new issue with a CodeSandbox showing the issue. |
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/swiper-default-react-forked-ukuwu9?file=/src/App.jsx
Bug description
I created an example to show the problem.
With this configuration:
loop={true} modules={[Navigation, EffectCoverflow, A11y, Pagination]} keyboard={false} centeredSlides navigation effect={"slide"} slideToClickedSlide pagination={{ clickable: true }} slidesPerGroup={1} spaceBetween={10} slidesPerView={1.53} coverflowEffect={{ rotate: 0, stretch: 80, depth: 200, modifier: 1, slideShadows: false }}
the isVisible property of swiperSlide hook return always false (there is the console.log).
There will be also super useful to have from this hook the "is the real active slide" property, because the property isActive is true for the slide and for all the duplicates.
Actually, the only way that I found was to search for className 'swiper-slide-active'
Expected Behavior
isVisible works fine
there is a property that returns an unique and active and visible slide valorized with the slide that actually has 'swiper-slide-active' classname
Actual Behavior
isVisible not working
Swiper version
8.2.2
Platform/Target and Browser Versions
all
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: