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

Fix outside click no longer working after closed once #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bezbos
Copy link

@bezbos bezbos commented Jun 20, 2022

Fixes the issue where you would tap outside the prompt and it would no longer open. This happens because the modal is closed but the state is not updated. My solution was to simply call the onCancelPressed which is also called when the "cancel" option is clicked.

Fixes the issue where you would tap outside the prompt and it would no longer open. This happens because the modal is closed but the state is not updated. My solution was to simply call the `onCancelPressed` which is also called when the "cancel" option is clicked.
Copy link
Owner

@rishabhbhatia rishabhbhatia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey Boško, check out the onDismiss callback here props. For resetting the state, this should get the job done.

Your thought process was right. For some reason, I don't have it declared in propTypes. But yeah, try it out.

@rishabhbhatia rishabhbhatia self-assigned this Jun 20, 2022
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

Successfully merging this pull request may close these issues.

2 participants