Internal
backdropPrivate
keyUsed to force re-initialization of modals if a modal is replaced by another of the same type.
Internal
modalInternal
modalShows a modal dialog.
If stackModal
is true
, the modal will be shown on top of the current modal.
If a value for stackModal
is not provided, opening a new modal will close
any others currently being shown for backwards compatibility.
Show a modal
app.modal.show(MyCoolModal, { attr: 'value' });
Show a modal from a lifecycle method (oncreate
, view
, etc.)
// This "hack" is needed due to quirks with nested redraws in Mithril.
setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);
Stacking modals
app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);
Generated using TypeDoc v0.24.8
Class used to manage modal state.
Accessible on the
app
object viaapp.modal
property.