diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index bdb10400f..94b2c9cbe 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -262,16 +262,25 @@ const BottomSheetComponent = forwardRef( adjustedSnapPointsIndexes.push(-1); } - return interpolate(position, { - inputRange: adjustedSnapPoints, - outputRange: adjustedSnapPointsIndexes, - extrapolate: Extrapolate.CLAMP, - }); - }, [position, safeContainerHeight, snapPoints]); + return cond( + animatedIsLayoutReady, + interpolate(position, { + inputRange: adjustedSnapPoints, + outputRange: adjustedSnapPointsIndexes, + extrapolate: Extrapolate.CLAMP, + }), + 0 + ); + }, [position, animatedIsLayoutReady, safeContainerHeight, snapPoints]); const animatedPosition = useMemo( - () => abs(sub(safeContainerHeight, position)), - [safeContainerHeight, position] + () => + cond( + animatedIsLayoutReady, + abs(sub(safeContainerHeight, position)), + safeContainerHeight + ), + [safeContainerHeight, position, animatedIsLayoutReady] ); /**