-
When bottom sheet starts animation (close animation) it's expected that animation can't be interrupted. Screenrecorder-2021-08-12-20-26-05-12.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 9 replies
-
@likern could you provide a reproducible sample code based on v4 template , i am working on a solution for this issue and i want to test it on your use-case |
Beta Was this translation helpful? Give feedback.
-
Yes, I can. But my use-case is really simple. It's reproducible without special code. Let's say user is pressing button very fast (like he is nervous). On first press bottom sheet starts opening. On second press bottom sheet is interrupted (it gets second press) and stays in the middle of transition. |
Beta Was this translation helpful? Give feedback.
-
The original answer is the same, just animating from top to bottom. |
Beta Was this translation helpful? Give feedback.
-
Okay, I’ll push a new shortly to prevent interaction with sheet content while animating |
Beta Was this translation helpful? Give feedback.
-
Should I put This is how I tested import BottomSheet, {
BottomSheetView,
BottomSheetBackdrop,
useBottomSheetDynamicSnapPoints
} from '@gorhom/bottom-sheet';
...
return (
<>
<BottomSheet
ref={reactNativeBottomSheetRef}
index={-1}
snapPoints={animatedSnapPoints}
handleHeight={animatedHandleHeight}
contentHeight={animatedContentHeight}
enablePanDownToClose={true}
enableOverDrag={false}
enableContentInteractionWhileAnimating={true}
handleComponent={Handle}
backdropComponent={Backdrop}
>
<BottomSheetView onLayout={handleContentLayout}>
{children}
</BottomSheetView>
</BottomSheet>
</>
); with both |
Beta Was this translation helpful? Give feedback.
Hi @likern, would you mind testing #769