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?')Defaults
Section titled “Defaults”| Action | Default confirm |
|---|---|
delete() |
None until you set .confirm(…) (still styled danger) |
bulkDelete() |
'Delete selected records?' |
Custom actions never confirm unless you call .confirm().
UX notes
Section titled “UX notes”- 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
handleActionafter confirm.
Confirm API
| Method | Description |
|---|---|
.confirm(message) | Show a confirm dialog with this message before running. |
See also Built-in actions and Custom actions.