colorfy-software / react-native-modalfy

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

animateInConfig not working? #69

Closed fifi98 closed 2 years ago

fifi98 commented 2 years ago

Hey,

First of all thanks for the awesome library, it really helped me with keeping my modals very well organised and reduced the amount of boilerplate code I had to have with the previous modal library.

I tried changing the duration of the fade in effect with the following ModalOptions as per documentation:

const defaultOptions: ModalOptions = {
  backdropOpacity: 0.6,
  animateInConfig: {
    duration: 50,
  },
  animateOutConfig: {
    duration: 50,
  },
};

The new duration value for the animate out is picking up right and the animation is quicker, however the animation does not react to changes made in the animatedInConfig object - I tried completely restarting the app but whichever duration I set the modal is always using the default value. Is there something that I'm doing wrong or could this be an issue?

Appreciate all the hard work!

CharlesMangwa commented 2 years ago

Hi @fifi98 and thanks for the kind words! I hope Modalfy will continue to serve you well!

Regarding your issue, I tried to reproduce it in the demo Expo app but to no avail. As you can see in the following video, I changed both the animatedInConfig & animatedOutConfig successfully to from the original 300 to 500, 50 then 100 (you might want to slow down the video to see the animations).

https://user-images.githubusercontent.com/8975443/158521681-8dfcf841-94be-48fd-9ea9-8876e31e5c68.mp4

FWIW: 50 was a bit too fast to be able to see any animation at all but 100 seems to be the nice spot where you can have something visible yet snappy:

https://user-images.githubusercontent.com/8975443/158521482-0729e7e2-7dff-485a-bf0c-5c82a268205c.mov

If you cannot achieve this, whenever you'll have a minute, please provide a repro project that I could look at.

CharlesMangwa commented 2 years ago

Closing due to inactivity. Feel free to reopen if needed!