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

Multiple Modal components #3445

Closed
maxs15 opened this issue Oct 15, 2015 · 17 comments
Closed

Multiple Modal components #3445

maxs15 opened this issue Oct 15, 2015 · 17 comments
Assignees
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@maxs15
Copy link

maxs15 commented Oct 15, 2015

It is currently impossible to create multiple Modal components.
Here is the warning that appears:
Warning: Attempt to present <RCTModalHostViewController: 0x7f89e4f8c2a0> on <UIViewController: 0x7f89e4903770> which is already presenting <RCTModalHostViewController: 0x7f89e4f84f10>

I don't know if it is something you did on purpose but I think it would be a huge plus to be able to render multiple modals.

@javache
Copy link
Member

javache commented Oct 15, 2015

This is currently not possible, I'm working on supporting this. For now you should be able to nest components to achieve this behaviour.

@maxs15
Copy link
Author

maxs15 commented Oct 15, 2015

Ok great, thanks @javache !

@pvenkatakrishnan
Copy link

Is this done in 0.19. I am running into the same issue and trying to put a safari view controller on a RCTModalHostViewController. This is not possible so far :(

@ianakiara
Copy link

+1

Does anyone have a workaround for this?

@mschipperheyn
Copy link

+1

@mschipperheyn
Copy link

How does this nesting work?

@dbuarque
Copy link

+1

1 similar comment
@mstuart
Copy link

mstuart commented Apr 20, 2016

+1

@SteveMellross
Copy link

+1
Any progress on this?

@javache
Copy link
Member

javache commented Jul 18, 2016

You should be able to present them as

<Modal>
  <Text>A</Text>
  <Modal>
    <Text>B</Text>
  </Modal>
</Modal>

@fostertime
Copy link

fostertime commented Jul 18, 2016

@javache so in the scenario you mention here, you would simply setState for visible on both at the same time if you wanted the nested <Modal></Modal>?

Update: I tested this, and it works perfectly. Thanks!

@pvenkatakrishnan
Copy link

how will this work if i wanted to present a SFVC on top of of a modal or vice versa ?

@wootwoot1234
Copy link

Any progress on this?

@charpeni
Copy link
Contributor

@facebook-github-bot label Icebox

@charpeni
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/multiple-modal-components

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@charpeni
Copy link
Contributor

@facebook-github-bot close

@facebook-github-bot facebook-github-bot added Icebox Ran Commands One of our bots successfully processed a command. labels Nov 14, 2016
@facebook-github-bot
Copy link
Contributor

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Nov 14, 2016
@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests