Skip to content
Shamar

Confirmations

.confirm(message) attaches a confirmation dialog. The Adonis host opens the shared dialog host (shamar-open-confirm) before POSTing the action.

actions.delete().confirm('Delete this ticket permanently?')
actions.bulkDelete().confirm('Delete %d selected tickets?')
// Host may interpolate selection counts when supported by the template.
actions.row('resolve', 'Mark resolved')
.icon('check')
.confirm('Mark this ticket as resolved?')
Action Default confirm
delete() None until you set .confirm(…) (still styled danger)
bulkDelete() 'Delete selected records?'

Custom actions never confirm unless you call .confirm().

  • Confirm runs for the configured message; cancel aborts with no request.
  • Danger-colored actions keep danger styling in the dialog trigger.
  • Built-in delete / bulk delete routes are handled by the host; custom names still go through handleAction after confirm.

Confirm API

MethodDescription
.confirm(message)Show a confirm dialog with this message before running.

See also Built-in actions and Custom actions.