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

Made onRequestClose a prop. Fixes #18 #19

Closed
wants to merge 1 commit into from

Conversation

mthahzan
Copy link

@mthahzan mthahzan commented Jun 25, 2019

It is ideal if the onRequestClose prop of the modal is exposed as an API instead of hiding it by default from the library itself.

@nysamnang
Copy link
Owner

@mthahzan There is no need to pass props onRequestClose as a function. Instead, i have made it as a boolean to control whether you want to disable back android or not 07c2078 .

If you want that, please kindly upgrade to the latest version.
Thank for your contribution.

@mthahzan
Copy link
Author

mthahzan commented Oct 5, 2019

Yeah, this addresses the issue I raised.

But the current implementation doesn't have the configurability of giving the user onRequestClose handler. For example, if the user wants to show a confirmation and then close on back press, they can't do that with just closeOnPressBack.

I personally would not do it this way. But it's up to you.

@nysamnang
Copy link
Owner

Yeah, you said it right. But "confirm to close modal" i think it will never happen 😄.

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.

None yet

2 participants