We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a6070f + 095b140 commit 4681580Copy full SHA for 4681580
packages/core/src/Swiper/index.tsx
@@ -58,6 +58,9 @@ const Swiper = (porps: SwiperProps) => {
58
if (scrollToRef && scrollToRef.current && index !== 0) {
59
setCurIndex(index);
60
scrollToRef.current.scrollTo({ x: width * index, y: 0, animated: false });
61
+ } else if (scrollToRef && scrollToRef.current && index === 0) {
62
+ setCurIndex(index);
63
+ scrollToRef.current.scrollTo({ x: dataSource.length * width, y: 0, animated: false });
64
}
65
};
66
0 commit comments