react-native-modal/react-native-modal

open two modals in a page.

gshoanganh opened this issue · 4 comments

I want to open two modals in a row,
currently if I open the first modal, I can't open the second modal from the first modal. :(

@gshoanganh at the moment you can use onModalHide in 1st modal. but you cant open second if 1st modal is not closed.

i have applied timer to make this work

@gshoanganh at the moment you can use onModalHide in 1st modal. but you cant open second if 1st modal is not closed.

i have applied timer to make this work

I've been doing that. But the UX is not satisfying (seeing one modal disappearing, THEN the other one showing). In some cases I have to use react-navigation with modal presentation.

praxiz commented

@gshoanganh I had this issue on iOS. It simply did not want me to have two modals up at the same time, for whatever reason. I also wanted to go from one modal to another, so what I did was:

<Modal
...
        onBackdropPress={() => hideSelf()}
        onModalHide={() => {
          _onModalHide();
        }}
...
>

and then a function called _onModalHide() that would set the hidden bool to true for the OTHER modal.

Hope this helps.

Hello, Try thiis package it support this feature https://www.npmjs.com/package/react-native-popup-dialog