|
|
@@ -176,6 +176,14 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
|
|
|
useEffect(() => {
|
|
|
if(isActive && isMeasured) {
|
|
|
+ if(!isWorkAsFullScreen && !isCanFullScreenOnSwipe && snapPoint) {
|
|
|
+ maxHeight.current = snapPoint;
|
|
|
+ } else if(isWorkAsFullScreen) {
|
|
|
+ maxHeight.current = containerHeightRef.current - (isWrapSafeAreaContext ? topSafeArea : 0);
|
|
|
+ } else {
|
|
|
+ maxHeight.current = containerHeightRef.current - (isForceFullScreenOnSwipe ? 0 : isWrapSafeAreaContext ? topSafeArea : 0);
|
|
|
+ }
|
|
|
+
|
|
|
openAnimation();
|
|
|
}
|
|
|
}, [
|
|
|
@@ -221,6 +229,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
|
|
|
const openAnimation = () => {
|
|
|
resetState();
|
|
|
+
|
|
|
if(onOpen) onOpen();
|
|
|
|
|
|
Animated.timing(animatedTranslateY, {
|
|
|
@@ -248,6 +257,7 @@ const BottomSheet: RefForwardingComponent<IBottomSheetRef, IBottomSheetProps> =
|
|
|
}) => {
|
|
|
if(finished) {
|
|
|
resetState();
|
|
|
+
|
|
|
setIsActive(false);
|
|
|
|
|
|
if(onClosed) onClosed();
|