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.
1 parent 3a7f686 commit 095b140Copy full SHA for 095b140
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