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

Ability to cancel a modal hide from the onHide callback #3168

Merged
merged 1 commit into from
Oct 14, 2015

Conversation

mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Oct 12, 2015

Currently the modal allows the user to cancel a hide from the onDeny and onApprove callbacks, but not from the onHide. This could be useful if you want to stop the user from hiding a modal but don't want to set closable to false.

For example, if you have a popup that submits a request to the server, and you want to display a loading state after the user has submitted, you could temporarily disable closing the popup by returning false from the onHide callback while the form submission is in progress.

Happy to also create a PR for the docs repository documenting this change.

@mdehoog mdehoog changed the title Added the ability to cancel a modal hide from the onHide callback Ability to cancel a modal hide from the onHide callback Oct 12, 2015
@jlukic
Copy link
Member

jlukic commented Oct 14, 2015

I don't see any downsides to this.

@jlukic jlukic added this to the 2.1.5 milestone Oct 14, 2015
jlukic added a commit that referenced this pull request Oct 14, 2015
Ability to cancel a modal hide from the onHide callback
@jlukic jlukic merged commit 17dbf95 into Semantic-Org:next Oct 14, 2015
mdehoog added a commit to mdehoog/Semantic-UI-Docs that referenced this pull request Oct 14, 2015
@mdehoog
Copy link
Contributor Author

mdehoog commented Oct 15, 2015

Thanks @jlukic. PR to update the docs for this change has been submitted.

You've done a fantastic job with this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants