Skip to content

Commit 0850cb8

Browse files
committed
fix(#2129): fixed initial isAnimatedOnMount value
1 parent 7bfe7ae commit 0850cb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/bottomSheet/BottomSheet.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
245245
const animatedNextPositionIndex = useSharedValue(INITIAL_VALUE);
246246

247247
// conditional
248-
const isAnimatedOnMount = useSharedValue(false);
248+
const isAnimatedOnMount = useSharedValue(
249+
!animateOnMount || _providedIndex === -1
250+
);
249251
const isContentHeightFixed = useSharedValue(false);
250252
const isLayoutCalculated = useDerivedValue(() => {
251253
let isContainerHeightCalculated = false;
@@ -674,6 +676,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
674676
params: {
675677
currentPosition: animatedPosition.value,
676678
nextPosition: position,
679+
source,
677680
},
678681
});
679682
}

0 commit comments

Comments
 (0)