@@ -5,7 +5,7 @@ import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useMemo,
55import type { ForwardedRef } from 'react' ;
66import { View } from 'react-native' ;
77import type { NativeSyntheticEvent , StyleProp , ViewStyle } from 'react-native' ;
8- import Animated , { FadeOutUp , LinearTransition } from 'react-native-reanimated' ;
8+ import Animated , { FadeOutUp , Keyframe , LinearTransition } from 'react-native-reanimated' ;
99import Checkbox from '@components/Checkbox' ;
1010import * as Expensicons from '@components/Icon/Expensicons' ;
1111import MenuItem from '@components/MenuItem' ;
@@ -312,6 +312,16 @@ function SearchList(
312312
313313 useImperativeHandle ( ref , ( ) => ( { scrollAndHighlightItem, scrollToIndex} ) , [ scrollAndHighlightItem , scrollToIndex ] ) ;
314314
315+ const Exiting = new Keyframe ( {
316+ from : {
317+ height : '100%' ,
318+ } ,
319+ to : {
320+ height : '0%' ,
321+ easing
322+ }
323+ } )
324+
315325 const renderItem = useCallback (
316326 // eslint-disable-next-line react/no-unused-prop-types
317327 ( { item, index} : { item : SearchListItem ; index : number } ) => {
@@ -321,7 +331,7 @@ function SearchList(
321331
322332 return (
323333 < Animated . View
324- exiting = { shouldAnimate ? FadeOutUp . duration ( CONST . SEARCH . EXITING_ANIMATION_DURATION ) . easing ( easing ) : undefined }
334+ exiting = { shouldAnimate ? Exiting . duration ( CONST . SEARCH . EXITING_ANIMATION_DURATION ) : undefined }
325335 entering = { undefined }
326336 style = { styles . overflowHidden }
327337 layout = { shouldAnimate && hasItemsBeingRemoved ? LinearTransition . easing ( easing ) . duration ( CONST . SEARCH . EXITING_ANIMATION_DURATION ) : undefined }
0 commit comments