[Modal] Approve behaviour #1263
-
I don't believe this exists, or at least not mentioned in the docs... Am wondering if perhaps there should be an "approve" behaviour added to the modal so custom keyboard handlers could be used to approve the modal, as opposed to needing to click on approve May also want to add "deny" as well for the same reason (yes, can already hide but may want to trigger onDeny as well) Another example usage may be an auto-logout prompt that may cancel a time when the mouse is moved and "denies" the prompt and cancels the auto-logout event (or potentially approves it and follows the logout procedure) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This should already be possible. $('.ui.modal').modal('event approve');
$('.ui.modal').modal('event deny'); The events are meant to be used internally only (thus not documented), but the behavior system is able to call any existing method inside the module |
Beta Was this translation helpful? Give feedback.
-
Aha! I did try the below, so close but no cigar... I wonder if maybe simply having an approve/deny behaviour would be better to have since internals can of course change over time (and would be more standardised) |
Beta Was this translation helpful? Give feedback.
-
Close since @lubber-de already provided the solution. Please feel free to reopen or create a separate issue if you've feature request about this. |
Beta Was this translation helpful? Give feedback.
This should already be possible.
The events are meant to be used internally only (thus not documented), but the behavior system is able to call any existing method inside the module