forked from Ivasoft/mattermost-mobile
Fix bottom sheet backdrop (#6595)
This commit is contained in:
@@ -64,6 +64,15 @@ const BottomSheet = ({closeButtonId, componentId, initialSnapIndex = 0, renderCo
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleCloseEnd = useCallback(() => {
|
||||
backdropOpacity.value = 0;
|
||||
setTimeout(close, 250);
|
||||
}, []);
|
||||
|
||||
const handleOpenStart = useCallback(() => {
|
||||
backdropOpacity.value = 1;
|
||||
}, []);
|
||||
|
||||
useAndroidHardwareBackHandler(componentId, handleClose);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -147,13 +156,8 @@ const BottomSheet = ({closeButtonId, componentId, initialSnapIndex = 0, renderCo
|
||||
borderRadius={10}
|
||||
initialSnap={snapPoints.length - 1}
|
||||
renderContent={renderContainerContent}
|
||||
onCloseEnd={close}
|
||||
onCloseStart={() => {
|
||||
backdropOpacity.value = 0;
|
||||
}}
|
||||
onOpenEnd={() => {
|
||||
backdropOpacity.value = 1;
|
||||
}}
|
||||
onCloseEnd={handleCloseEnd}
|
||||
onOpenStart={handleOpenStart}
|
||||
enabledBottomInitialAnimation={false}
|
||||
renderHeader={Indicator}
|
||||
enabledContentTapInteraction={false}
|
||||
|
||||
Reference in New Issue
Block a user