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

Error layout when use DialogManager.dismiss. #6

Open
HuyHQDev opened this issue Sep 25, 2017 · 4 comments
Open

Error layout when use DialogManager.dismiss. #6

HuyHQDev opened this issue Sep 25, 2017 · 4 comments

Comments

@HuyHQDev
Copy link

When use DialogManager.dismiss(), dialog width expand to fullscreen then dismiss

@ArsenyYankovsky
Copy link

Any workarounds on that?
If I have time in the next few days I'll take a look and find what is the difference between calling dismiss on a DialogManager and tapping outside of dialog (which doesn't reproduce an issue for me).

@ArsenyYankovsky
Copy link

The issue is only reproducible if you create a dialog via DialogManager as it uses react-native-root-siblings to draw a dialog and can't properly update its props.

The workaround is to use the DialogComponent. Note that is should be placed in your top-level element to be rendered correctly, in case you're using react-navigation that would be your screen.

@krakz999
Copy link

krakz999 commented Sep 6, 2018

For anyone having this problem, close your dialog using DialogManager.currentDialog.destroy()

Disclaimer: This will close the dialog without ANY animation.

@Orijinn
Copy link

Orijinn commented Nov 9, 2018

For me, using DialogManager.currentDialog.destroy() indeed fixed the animation issue, but created a new problem - a warning about changing a state of a non-mounted component, and also this preventing Back on Android from working correctly.
It appears that using dialogAnimation : new ScaleAnimation(), in the config fixes the issue.

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