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

Cannot close Modal and Scene at once from inside of the Modal #2022

Closed
mswokk opened this issue Jul 13, 2017 · 4 comments
Closed

Cannot close Modal and Scene at once from inside of the Modal #2022

mswokk opened this issue Jul 13, 2017 · 4 comments

Comments

@mswokk
Copy link

mswokk commented Jul 13, 2017

I'm using react-native-router-flux : 3.40.1

Scenario and expected result.
I have a stacked scene and before pop this scene (using Actions.pop()),
I show a confirm Dialog using Modal from react-native-router-flux.
On OK press in the Dialog, I want to close Dialog (Modal) and pop the Scene at once.

Actual result
Actions.pop() dismisses the Dialog but not Scene.

My code structure
Same with Modal example in https://github.com/aksonov/react-native-router-flux/blob/master/docs/OTHER_INFO.md

I tried in the onPress() in the Dialog

// Call twice
Actions.pop();
Actions.pop();
// Pop with param
Actions.pop(2)
//Using setTimout()
setTimeout(Actions.pop, 10)
setTimeout(Actions.pop, 1000)
// Combine upper tries using async 
async()=>{
setTimeout(Actions.pop, 10)
setTimeout(Actions.pop, 1000)
}

Am I doing right?

@aksonov
Copy link
Owner

aksonov commented Jul 13, 2017

Sorry, v3 is not supported.

@aksonov aksonov closed this as completed Jul 13, 2017
@luco
Copy link
Contributor

luco commented Jul 18, 2017

@aksonov How can we achieve this on v4?
I'm getting this. Once I open a modal and navigate into it, I cant dismiss the modal.

@tendolukwago
Copy link

@aksonov @luco did you ever find an answer to this?

@mswokk
Copy link
Author

mswokk commented Aug 16, 2017

I found workaround in v3.
Just calling setTimeout(Actions.pop) works.
In my original post, I made some mistakes.
setTimeout(Action.pop, N) should works.

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

No branches or pull requests

4 participants