From 48c49888b95dc88abf320d4d7590f43806e0bd59 Mon Sep 17 00:00:00 2001 From: Mo Gorhom Date: Sun, 23 May 2021 15:40:55 +0100 Subject: [PATCH] fix: on mount flicker on fixed sheet --- src/components/bottomSheet/BottomSheet.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index 4f0c20b44..240953008 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -910,8 +910,7 @@ const BottomSheetComponent = forwardRef( if (animateOnMount) { animateToPosition(nextPosition); } else { - // to snap sheet to position without duration - animateToPosition(nextPosition, 0, { duration: 0 }); + animatedPosition.value = nextPosition; } isAnimatedOnMount.value = true; } @@ -1169,13 +1168,11 @@ const BottomSheetComponent = forwardRef( animatedIndex, animatedCurrentIndex, animatedPosition, - _animatedContainerHeight, animatedContainerHeight, animatedSheetHeight, animatedHandleHeight, animatedContentHeight, keyboardHeight, - WINDOW_HEIGHT, isLayoutCalculated, isInTemporaryPosition, }}