Skip to content

Commit 758f054

Browse files
authored
Add jumpToCardIndex function for DeckSwiper ref (#1018)
1 parent 5575cbe commit 758f054

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/core/src/components/DeckSwiper/DeckSwiper.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ const DeckSwiper = React.forwardRef<DeckSwiperRef, DeckSwiperProps<any>>(
130130
deckSwiperRef.current?.swipeLeft();
131131
}
132132
},
133+
jumpToCardIndex: (index: number) => {
134+
deckSwiperRef.current?.jumpToCardIndex(index);
135+
},
133136
}));
134137

135138
/**

0 commit comments

Comments
 (0)