You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bestseob93
changed the title
swiper/react: onSlideChange auto-trigger issue with non-zero initialSlide even if runCallbacksOnInit is disabled
swiper/react: onRealIndexChange auto-trigger issue with non-zero initialSlide even if runCallbacksOnInit is disabled
Aug 24, 2023
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/swiper-react-default-forked-h6sndy
Bug description
On initial render, passing a non-zero value to initialSlide as a Swiper prop triggers onRealIndexChange even if runCallbacksOnInit is disabled.
It only occurs in swiper/react and not in swiper.
Expected Behavior
initialSlide is a value that specifies the initial position, so those event listeners shouldn't be triggered on initial render.
Actual Behavior
No response
Swiper version
ALL
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: