Skip to content

Fix outside click no longer working after closed once#112

Open
bezbos wants to merge 1 commit intorishabhbhatia:masterfrom
bezbos:master
Open

Fix outside click no longer working after closed once#112
bezbos wants to merge 1 commit intorishabhbhatia:masterfrom
bezbos:master

Conversation

@bezbos
Copy link
Copy Markdown

@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
Copy Markdown
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