colorfy-software / react-native-modalfy

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

onDismiss callback? #16

Closed new-Kong closed 4 years ago

new-Kong commented 4 years ago

Hi,

Thanks for creating such an awesome library!

I wanna ask whether this library has the functionality of onDismiss callback?

So far, I know I can dismiss through clicking at "close" icon or go back to previous modal by tapping at the shaded region behind the modal.

Any way to dismiss and close modal when I tap at shaded region instead of going back to previous modal ?

Thank you.

CharlesMangwa commented 4 years ago

Hi @new-Kong! Thanks for the support!

If your question is: is there a way to close all opened modals by pressing the backdrop once, not at the moment no. If that wasn't your question, could you explain your use case a bit more please?

CharlesMangwa commented 4 years ago

Closing for inactivity, feel free to re-open if needed.

CharlesMangwa commented 4 years ago

Hey @new-Kong ! Just wanted to let you know that Modalfy v2 just shipped with support for backdrop closing action controlled by backBehavior (to dismiss and close a single or multiple modal when you press it). You can check out the blog post over here whenever you'll have a moment: https://colorfy-software.gitbook.io/react-native-modalfy/blog/modalfy-v2!