colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.13k stars 46 forks source link

Modal doesn't animate out if it's the first modal in the stack #96

Closed TypeSammy closed 1 year ago

TypeSammy commented 1 year ago

Currently on the latest version of Modalfy, v3.3.3.

It seems that animateOutConfig and animateOut has no effect on modals that are first in the stack. Snack here which uses the example config found in createModalStack docs.

In the snack, the first modal slides in at 2000ms, however instead of sliding out at 2000ms it fades out at a much faster rate (which seems to be Modalfy's default animation when no custom animation is passed in). The second modal in the stack does a slide in and slide out animation at 2000ms just fine.

CharlesMangwa commented 1 year ago

hey @TypeSammy! thanks for reporting this issue. i would have to look into it indeed.

if you have time on your side to dive into the internals of the library, it'll be a pleasure to review your pr. otherwise: i'll let you know as soon as the fix is out!

CharlesMangwa commented 1 year ago

hi @TypeSammy! thanks for your patience regarding this issue! 🙌 i'm happy to report that this issue was fixed in the latest release (v.3.4.0). i gave it a couple of tries, even with the snack you provided, and everything seems to be working as expected now. let me know if it's all good on your side as well!

Christofon commented 1 year ago

I have the same issue. Using the lib in a way where there is at all times only one modal shown and closing it with closeAllModals/closeModal(undefined). The animateIn works perfectly fine but when closing it does not animate.

CharlesMangwa commented 1 year ago

hi @Christofon! which version of modalfy are you using? and could you also provide a repro on snack as well pls?

Christofon commented 1 year ago

Here the snack you asked for. Using version 3.4.0. As you can see, the modal animated in perfectly fine but the animateOut is not triggered at all.

mirik999 commented 8 months ago

@CharlesMangwa I have the same issue in my case i am using only one Modal ( one modal for all use cases ) and when i open modal animation works well but when i open second modal ( the same modal from stack ) the animation (in and out) doesnt work, is it because i am calling the same modal ?

version. 3.5.2