react-native-modalfy icon indicating copy to clipboard operation
react-native-modalfy copied to clipboard

Closing the modal immediately after opening for the second time on Fabric

Open sivantha96 opened this issue 10 months ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

When I open the modal the first time it works fine. The second time it opens up the modal, but seems like its invisible because of the translateY. It will start showing both modals after I open another modal. This issue started to occur after I enabled fabric.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-modalfy/src/lib/ModalStack.tsx b/node_modules/react-native-modalfy/src/lib/ModalStack.tsx
index 6eb20bb..9f5986f 100644
--- a/node_modules/react-native-modalfy/src/lib/ModalStack.tsx
+++ b/node_modules/react-native-modalfy/src/lib/ModalStack.tsx
@@ -47,7 +47,7 @@ const ModalStack = <P extends ModalfyParams>(props: Props<P>) => {
       }).start(() => {
         setStackStatus('hidden')
         setBackdropClosedItems([])
-        translateY.setValue(sh(100))
+        // translateY.setValue(sh(100))
       })
     }
   }, [backdropAnimationDuration, opacity, translateY, stackStatus])

This issue body was partially generated by patch-package.

sivantha96 avatar Apr 16 '24 09:04 sivantha96