From 8dd5a8e32ae53fb3c5e51eaea7cda8c8450d286e Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Sat, 28 Sep 2024 08:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix:=20`ModalSheetView`=20-=20Un?= =?UTF-8?q?mount=20Modal=20Content=20On=20Dismissal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ModalSheetView/ModalSheetView.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/ModalSheetView/ModalSheetView.tsx b/src/components/ModalSheetView/ModalSheetView.tsx index 5ad5fd6b..2969f4f1 100644 --- a/src/components/ModalSheetView/ModalSheetView.tsx +++ b/src/components/ModalSheetView/ModalSheetView.tsx @@ -105,6 +105,12 @@ export const ModalSheetView = React.forwardRef< {...props} ref={ref => nativeRef.current = ref} style={styles.nativeModalSheet} + onModalDidHide={(event) => { + setShouldExplicitlyMountModalContents(false); + + props.onModalDidHide?.(event); + event.stopPropagation(); + }} > {children}