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

Navigation on thumb slider doesn't work well #5568

Closed
5 of 6 tasks
warudin opened this issue Mar 21, 2022 · 11 comments
Closed
5 of 6 tasks

Navigation on thumb slider doesn't work well #5568

warudin opened this issue Mar 21, 2022 · 11 comments
Labels

Comments

@warudin
Copy link

warudin commented Mar 21, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/swiper-thumbs-gallery-forked-bpv8b4?file=/index.html

Bug description

When adding navigation arrows to a thumb-slider, they don't fully function as expected. There's some slider functionality, but the 'thumb' functions don't seem to be working.

Expected Behavior

When pressing an arrow in the thumb slider I expect:

  • the thumb-slider to slide to the next slide;
  • the main-slider to slide to the next slide;

Actual Behavior

When pressing an arrow in the thumb slider the following happens:

  • the thumb-slider slides to the next slide (which is good);
  • the 'swiper-slide-thumb-active' class is not transferred to the newly active slide (which is not good);
  • the main-slider does not respond to the slide change from the thumb slider;

Swiper version

8.0.7

Platform/Target and Browser Versions

macOS, Windows, Android

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
@Richard-08
Copy link

Richard-08 commented Mar 23, 2022

@warudin Hi! You can add a slide change listener to the thumb-slider. For example - https://codesandbox.io/s/swiper-thumbs-gallery-forked-v7bc5s?file=/index.html

@warudin
Copy link
Author

warudin commented Mar 23, 2022

Hi @Richard-08, thanks for providing a solution! We're very happy with this.

although this solves the problem, shouldn't it be working out of the box without such an addition?

@Richard-08
Copy link

@warudin It doesn't work out of the box. In fact, navigation for the thumb-slider now works the same way as for the main-slider.
Another solution might be to leave only the main-slider's navigation and position it next to the thumb-slider.

@RodrigoTomeES
Copy link

Hi, anyone has this issue with the thumb-slider? #4748

@Richard-08
Copy link

@RodrigoTomeES Hi! One of the possible solutions - https://codesandbox.io/s/bug-swiper-forked-yr1xyj?file=/src/Components/Slider/Slider.js
Changed methods onNextSlide and onPrevSlide.

@RodrigoTomeES
Copy link

@Richard-08 amazing thanks!

@simonlayfield
Copy link

simonlayfield commented Jun 14, 2022

@warudin Hi! You can add a slide change listener to the thumb-slider. For example - https://codesandbox.io/s/swiper-thumbs-gallery-forked-v7bc5s?file=/index.html

The one issue I have found with this is that there's no way to navigate to the last X number of slides using the thumbs navigation. As soon as the last thumb slide is in view, it disappears (or is disabled). Clicking on those thumbnails does update the slider as expected, but then clicking on the previous arrow causes it to jump back to the first of the hidden slides.

It's almost got me to where I need it. Is there a way to ensure that the navigation is only disabled when navigating to the last slide in thumbs, and not when the last slide is in view? I've made a few hacky attempts at re-enabling the navigation at the point it gets disabled, but no luck so far.

Thanks for getting me this far, anyway.

@arcs-
Copy link

arcs- commented Oct 19, 2022

This appears to be solved in version 8.4.4

@warudin
Copy link
Author

warudin commented Oct 19, 2022

I don't really see any difference when using the navigation buttons in the thumbnail-slider when using version 8.4.4.

The sliding process does work, but the main slider isn't changing accordingly.

@rabi-jollycommerce
Copy link

I am having same issue, when thumb is clicked, there is no response and main slide does not appear.

@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants