Closed willymai closed 1 year ago
I face same issue with version 3.5.1
. Issue goes away if I remove transitionOptions
from animation config. Version 3.4.0
seems fine, temporarily downgraded.
I face same problem here.
@willymai thanks for reporting this issue! i'll be looking into asap, just have some other urgent matters to take care of before i can have some time to work on modalfy.
@DovletAmanov thank you for the info, that will help find the root cause of this issue!
hey @willymai @DovletAmanov @Fagner3g! i think i may have fixed it actually! turned out it was an issue i stumbled upon in our own apps but in a different form. however, the fix was similar.
long story short: the issue was coming from an unnecessary use of the finished
argument provided to the Animated.some_method().start()
's callback. as mentioned in react native's doc, that finished
is not a boolean that indicates if the animation is done running (and therefore a callback can now be invoked). it actually simply indicates if the animation was interrupted or not while running. simply providing a callback method is enough to make sure that it'll be invoked once the animation is done (either fully or because it was interrupted): https://reactnative.dev/docs/animated#working-with-animations.
modalfy docs & examples should have all been updated to reflect that by removing any use of finished
. i would recommend you do the same if you were also using finished
in your apps for the modal config.
please let me know if v3.5.2
fixes this issue on your side!
The issue persists on v3.5.2 as well. as @DovletAmanov suggested 3.4.0 works fine.
The same issue still persists on v3.5.2. @CharlesMangwa
You can check reproduce example here https://snack.expo.dev/@willymai/duplicate-modal
Modal is opened twice after clicking button to close the current modal
Reproduce step
Press me
button to open modalOk
to close modalPress me
andOk
buttonTest case 2:
Press me
button to open modalwith
"react-native-modalfy": "3.5.1"