@@ -740,26 +740,14 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
740740 runOnJS ( handleOnAnimate ) ( position , source , animatedSnapPoints . value ) ;
741741
742742 /**
743- * force animation configs from parameters, if provided
743+ * start animation
744744 */
745- if ( configs !== undefined ) {
746- animatedPosition . value = animate ( {
747- point : position ,
748- configs,
749- velocity,
750- onComplete : animateToPositionCompleted ,
751- } ) ;
752- } else {
753- /**
754- * use animationConfigs callback, if provided
755- */
756- animatedPosition . value = animate ( {
757- point : position ,
758- velocity,
759- configs : _providedAnimationConfigs ,
760- onComplete : animateToPositionCompleted ,
761- } ) ;
762- }
745+ animatedPosition . value = animate ( {
746+ point : position ,
747+ configs : configs || _providedAnimationConfigs ,
748+ velocity,
749+ onComplete : animateToPositionCompleted ,
750+ } ) ;
763751 } ,
764752 [ handleOnAnimate , _providedAnimationConfigs ]
765753 ) ;
@@ -1313,7 +1301,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
13131301 return ;
13141302 }
13151303
1316- let nextPosition ;
1304+ let nextPosition : number ;
13171305 if ( _providedIndex === - 1 ) {
13181306 nextPosition = animatedClosedPosition . value ;
13191307 animatedNextPositionIndex . value = - 1 ;
@@ -1346,7 +1334,9 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
13461334 }
13471335
13481336 if ( animateOnMount ) {
1349- animateToPosition ( nextPosition , ANIMATION_SOURCE . MOUNT ) ;
1337+ requestAnimationFrame ( ( ) => {
1338+ animateToPosition ( nextPosition , ANIMATION_SOURCE . MOUNT ) ;
1339+ } ) ;
13501340 } else {
13511341 animatedPosition . value = nextPosition ;
13521342 }
0 commit comments