Skip to content

[Bug]: changing snap-points dynamically causing background to show #2553

@AyushMittal42

Description

@AyushMittal42

Version

v5

Reanimated Version

v3

Gesture Handler Version

v2

Platforms

Android

What happened?

In new arch, when I am trying to change my snappoints dynamically, the bottom sheet does not animate properly
Like lets say if I change my snap from 30% to 80% the sheet content will go up showing the background behind it and the it will animate from top to bottom

Image

Reproduction steps

Will happen every time when try to change snappoint dynamically

const memoizedSnapPoints = useMemo(() => {
       return isDestinationPickerActive
           ? Platform.OS === 'iOS'
               ? ['90%']
               : [SCREEN_HEIGHT - top]
           : props.repeatBookings && props.repeatBookings.length > 0 && !isUndefined(destinationStation)
               ? [335 + bottom]
               : props.repeatBookings && props.repeatBookings.length > 0
                   ? [400 + bottom]
                   : isUndefined(destinationStation)
                       ? [290]
                       : [360];
   }, [isDestinationPickerActive, props.repeatBookings, destinationStation]);


<BottomSheet
   snapPoints={memoizedSnapPoints}
   index={0}
   enableDynamicSizing={false}
   // other props>



Reproduction sample

https://snack.expo.dev/@gorhom/bottom-sheet---issue-reproduction-template

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions