Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sivantha96 opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sivantha96
Copy link

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.

@CharlesMangwa CharlesMangwa self-assigned this Jul 5, 2024
@CharlesMangwa CharlesMangwa added the bug Something isn't working label Jul 5, 2024
@CharlesMangwa
Copy link
Member

hi @sivantha96! thank you for spotting this issue. were you able to check if your fix also work when fabric is disabled and on web, by any chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants