@@ -195,7 +195,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
195
195
return $modal
196
196
? _animatedContainerHeight . value - verticalInset
197
197
: _animatedContainerHeight . value ;
198
- } , [ $modal , topInset , bottomInset ] ) ;
198
+ } , [ topInset , bottomInset , $modal , _animatedContainerHeight . value ] ) ;
199
199
const animatedContainerOffset = useReactiveSharedValue (
200
200
_providedContainerOffset ?? INITIAL_CONTAINER_OFFSET
201
201
) as Animated . SharedValue < Insets > ;
@@ -214,7 +214,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
214
214
maxDynamicContentSize
215
215
) ;
216
216
const animatedHighestSnapPoint = useDerivedValue (
217
- ( ) => animatedSnapPoints . value [ animatedSnapPoints . value . length - 1 ]
217
+ ( ) => animatedSnapPoints . value [ animatedSnapPoints . value . length - 1 ] ,
218
+ [ animatedSnapPoints . value ]
218
219
) ;
219
220
const animatedClosedPosition = useDerivedValue ( ( ) => {
220
221
let closedPosition = animatedContainerHeight . value ;
@@ -224,9 +225,10 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
224
225
}
225
226
226
227
return closedPosition ;
227
- } , [ $modal , detached , bottomInset ] ) ;
228
+ } , [ animatedContainerHeight . value , $modal , detached , bottomInset ] ) ;
228
229
const animatedSheetHeight = useDerivedValue (
229
- ( ) => animatedContainerHeight . value - animatedHighestSnapPoint . value
230
+ ( ) => animatedContainerHeight . value - animatedHighestSnapPoint . value ,
231
+ [ animatedContainerHeight . value , animatedHighestSnapPoint . value ]
230
232
) ;
231
233
const animatedCurrentIndex = useReactiveSharedValue (
232
234
animateOnMount ? - 1 : _providedIndex
@@ -274,7 +276,13 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
274
276
isHandleHeightCalculated &&
275
277
isSnapPointsNormalized
276
278
) ;
277
- } ) ;
279
+ } , [
280
+ _providedContainerHeight ,
281
+ animatedContainerHeight . value ,
282
+ animatedHandleHeight ,
283
+ animatedSnapPoints . value ,
284
+ handleComponent ,
285
+ ] ) ;
278
286
const isInTemporaryPosition = useSharedValue ( false ) ;
279
287
const isForcedClosing = useSharedValue ( false ) ;
280
288
@@ -399,7 +407,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
399
407
}
400
408
401
409
return SCROLLABLE_STATE . LOCKED ;
402
- } ) ;
410
+ } , [
411
+ animatedAnimationState . value ,
412
+ animatedKeyboardState . value ,
413
+ animatedScrollableOverrideState . value ,
414
+ animatedSheetState . value ,
415
+ ] ) ;
403
416
// dynamic
404
417
const animatedContentHeightMax = useDerivedValue ( ( ) => {
405
418
const keyboardHeightInContainer = animatedKeyboardHeightInContainer . value ;
@@ -513,7 +526,18 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
513
526
}
514
527
515
528
return currentIndex ;
516
- } , [ android_keyboardInputMode ] ) ;
529
+ } , [
530
+ android_keyboardInputMode ,
531
+ animatedAnimationSource . value ,
532
+ animatedAnimationState . value ,
533
+ animatedContainerHeight . value ,
534
+ animatedCurrentIndex . value ,
535
+ animatedNextPositionIndex . value ,
536
+ animatedPosition . value ,
537
+ animatedSnapPoints . value ,
538
+ isInTemporaryPosition . value ,
539
+ isLayoutCalculated . value ,
540
+ ] ) ;
517
541
//#endregion
518
542
519
543
//#region private methods
@@ -1258,7 +1282,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1258
1282
configs : _providedAnimationConfigs ,
1259
1283
} ) ,
1260
1284
} ;
1261
- } , [ animatedContentHeightMax , enableDynamicSizing , animatedContentHeight ] ) ;
1285
+ } , [
1286
+ enableDynamicSizing ,
1287
+ animatedContentHeight . value ,
1288
+ animatedContentHeightMax . value ,
1289
+ _providedAnimationConfigs ,
1290
+ ] ) ;
1262
1291
const contentContainerStyle = useMemo (
1263
1292
( ) => [ styles . contentContainer , contentContainerAnimatedStyle ] ,
1264
1293
[ contentContainerAnimatedStyle ]
@@ -1277,7 +1306,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1277
1306
return {
1278
1307
paddingBottom : animatedContainerHeight . value ,
1279
1308
} ;
1280
- } , [ detached ] ) ;
1309
+ } , [ animatedContainerHeight . value , detached ] ) ;
1281
1310
const contentMaskContainerStyle = useMemo (
1282
1311
( ) => [ styles . contentMaskContainer , contentMaskContainerAnimatedStyle ] ,
1283
1312
[ contentMaskContainerAnimatedStyle ]
@@ -1424,7 +1453,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1424
1453
}
1425
1454
}
1426
1455
animateToPosition ( nextPosition , animationSource , 0 , animationConfig ) ;
1427
- }
1456
+ } ,
1457
+ [ ]
1428
1458
) ;
1429
1459
1430
1460
/**
@@ -1547,7 +1577,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1547
1577
if ( _providedAnimatedPosition ) {
1548
1578
_providedAnimatedPosition . value = _animatedPosition + topInset ;
1549
1579
}
1550
- }
1580
+ } ,
1581
+ [ ]
1551
1582
) ;
1552
1583
1553
1584
/**
@@ -1559,7 +1590,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1559
1590
if ( _providedAnimatedIndex ) {
1560
1591
_providedAnimatedIndex . value = _animatedIndex ;
1561
1592
}
1562
- }
1593
+ } ,
1594
+ [ ]
1563
1595
) ;
1564
1596
1565
1597
/**
0 commit comments