File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/components/SlideAnimatedView Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 7272 "publishConfig" : {
7373 "access" : " public"
7474 },
75- "repository" : " https://github.com/strvcom/react-native-hero-carousel"
75+ "repository" : " https://github.com/strvcom/react-native-hero-carousel" ,
76+ "packageManager" :
" [email protected] +sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" 7677}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ type SlideAnimatedViewProps = {
1717 enteringThreshold ?: number
1818 exitingThreshold ?: number
1919 style ?: AnimatedProps < ViewProps > [ 'style' ]
20+ keepVisibleAfterExiting ?: boolean
2021}
2122
2223export const SlideAnimatedView = ( {
@@ -26,6 +27,7 @@ export const SlideAnimatedView = ({
2627 layout,
2728 enteringThreshold = 0.99 ,
2829 exitingThreshold = 0.01 ,
30+ keepVisibleAfterExiting = false ,
2931 style,
3032} : SlideAnimatedViewProps ) => {
3133 const { index, total } = useAutoCarouselSlideIndex ( )
@@ -56,6 +58,9 @@ export const SlideAnimatedView = ({
5658 currentValue <= exitingThreshold &&
5759 ( previousValue === null || previousValue > exitingThreshold )
5860 ) {
61+ if ( keepVisibleAfterExiting ) {
62+ return
63+ }
5964 runOnJS ( setShouldShow ) ( false )
6065 }
6166 } ,
You can’t perform that action at this time.
0 commit comments