Skip to content

Commit d60685b

Browse files
authored
fix: adjust offset target value for translation on axis y (#4008)
1 parent 264f7fa commit d60685b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/BottomNavigation/BottomNavigation.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,14 @@ const BottomNavigation = <Route extends BaseRoute>({
509509
? 1
510510
: 0;
511511

512+
const offsetTarget = focused ? 0 : FAR_FAR_AWAY;
513+
512514
const top = sceneAnimationEnabled
513515
? offsetsAnims[index].interpolate({
514516
inputRange: [0, 1],
515-
outputRange: [0, FAR_FAR_AWAY],
517+
outputRange: [0, offsetTarget],
516518
})
517-
: focused
518-
? 0
519-
: FAR_FAR_AWAY;
519+
: offsetTarget;
520520

521521
const left =
522522
sceneAnimationType === 'shifting'

0 commit comments

Comments
 (0)