From 8c1f5f6564b69b4a04f4be2224d1bc3d88372275 Mon Sep 17 00:00:00 2001 From: Paul Rostorp Date: Tue, 1 Nov 2022 10:27:43 +0100 Subject: [PATCH] exit `OnKeyboardStateChange` if the sheet is about close, then exit --- src/components/bottomSheet/BottomSheet.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index b16644070..3d475749b 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -1401,7 +1401,11 @@ const BottomSheetComponent = forwardRef( */ (Platform.OS === 'android' && keyboardBehavior === KEYBOARD_BEHAVIOR.interactive && - android_keyboardInputMode === KEYBOARD_INPUT_MODE.adjustResize) + android_keyboardInputMode === KEYBOARD_INPUT_MODE.adjustResize) || + /** + * if the sheet is closing, then exit then method + */ + animatedNextPositionIndex.value == -1 ) { animatedKeyboardHeightInContainer.value = 0; return;