File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
package/src/components/UIComponents Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
55import { Portal } from 'react-native-teleport' ;
66
77import { useStableCallback } from '../../hooks' ;
8- import { setClosingPortalLayout , useOverlayController } from '../../state-store' ;
8+ import {
9+ clearClosingPortalLayout ,
10+ setClosingPortalLayout ,
11+ useOverlayController ,
12+ } from '../../state-store' ;
913
1014type PortalWhileClosingViewProps = {
1115 children : ReactNode ;
@@ -58,6 +62,14 @@ export const PortalWhileClosingView = ({
5862 } ;
5963 } , [ insets . top , portalHostName ] ) ;
6064
65+ const unregisterPortalHost = useStableCallback ( ( ) => clearClosingPortalLayout ( portalHostName ) ) ;
66+
67+ useEffect ( ( ) => {
68+ return ( ) => {
69+ unregisterPortalHost ( ) ;
70+ } ;
71+ } , [ unregisterPortalHost ] ) ;
72+
6173 const onWrapperViewLayout = useStableCallback ( ( event : LayoutChangeEvent ) => {
6274 const { height, width } = event . nativeEvent . layout ;
6375 layoutRef . current = { h : height , w : width } ;
You can’t perform that action at this time.
0 commit comments