swiper icon indicating copy to clipboard operation
swiper copied to clipboard

Swiper setTranslate does not update the active Thumb

Open jmnProcom opened this issue 3 years ago • 1 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codesandbox.io/s/swiper-thumbs-gallery-loop-react-forked-7c1xov?file=/src/App.jsx

Bug description

When manually calling setTranslate on the swiper instance, the active state from the thumbsSwiper is not updated. Although, using setProgress does update thumbsSwiper.

Expected Behavior

When setTranslate is called on the main swiper instance, the thumbs instance active item should be updated.

Actual Behavior

When setTranslate is called on the main swiper instance, the thumbs instance remains the same.

Swiper version

8.3.2

Platform/Target and Browser Versions

Windows 10 Chrome 103.0.5060.134

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the docs.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [X] 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

jmnProcom avatar Jul 29 '22 18:07 jmnProcom

Found a workaround for now by doing a setProgress after the setTranslate with the exact same progress value.

jmnProcom avatar Jul 29 '22 19:07 jmnProcom

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.

nolimits4web avatar Feb 01 '23 11:02 nolimits4web