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

[Feature] Add options / hooks for subscribing to Bootstrap modal events #737

Closed
4 tasks done
tiesont opened this issue Nov 21, 2019 · 0 comments · Fixed by #740
Closed
4 tasks done

[Feature] Add options / hooks for subscribing to Bootstrap modal events #737

tiesont opened this issue Nov 21, 2019 · 0 comments · Fixed by #740

Comments

@tiesont
Copy link
Member

tiesont commented Nov 21, 2019

See #733 for the genesis of this feature.

We'll be adding the ability to subscribe to the events raised by Bootstrap's modal function:

  • onShow
    Handles the show.bs.modal event.
  • onShown
    Handles the shown.bs.modal event.
  • onHide
    Handles the hide.bs.modal event.
  • onHidden
    Handles the hidden.bs.modal event.

Once implemented, this:

let dialog = bootbox.alert({
    message: 'I have a custom shown handler!'
});

dialog.on('shown.bs.modal', function(e) {
    /* code to execute when shown.bs.modal is raised */
})

becomes this:

bootbox.alert({
    message: 'I have a custom shown handler!',
    onShown: function(e) {
        /* code to execute when shown.bs.modal is raised */
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant