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

Close/Dismiss all modals which are open at once. #740

Open
elencho opened this issue Jun 6, 2023 · 1 comment
Open

Close/Dismiss all modals which are open at once. #740

elencho opened this issue Jun 6, 2023 · 1 comment
Labels

Comments

@elencho
Copy link

elencho commented Jun 6, 2023

Environment

react: 18.2.0 => 18.2.0 
react-native: 0.71.4 => 0.71.4 

Platforms

both

Versions

"react-native-modal": "^13.0.1"

Description

Is there any way to dismiss modals with one action? I want to dismiss all modals when token is invalid in interceptor

Reproducible Demo

Just a question, doesn't need demo

@elencho elencho added the bug label Jun 6, 2023
@sbaiahmed1
Copy link

Just for now, Try to close them by dispatching an action from an interceptor
e.g. you have your modal state in a redux state and then you dispatch store.dispatch('close modalX') where you listen to this variable in your all of your modals useEffect or smth like this ... and if your modal has captured a certain value it dismisses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants