ViewDestroy
Overview
View that presents a confirmation form and displays a list of selected items to be deleted via ModelActionForm, then sends a DELETE request when the user confirms.
Wraps the ModelActionForm in a destructive-toned card with a danger banner so the blast radius is legible at a glance. The banner exposes a linkedObjectCounts prop and a banner slot for surfacing cascading-delete summaries when the server provides them.
Theme entry: ViewDestroy
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | Object | null | A partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants. | |
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| app | string | yes | Django app label that owns the model. | |
| model | string | yes | Django model name whose instances will be permanently deleted. | |
| pk | string|array | yes | Primary key or array of primary keys identifying the instances to delete. | |
| linkedObjectCounts | array | [] | Optional summary of objects that will be cascade-deleted alongside the target. Each entry is rendered as a line in the banner description (e.g. { verboseNamePlural: "comments", count: 12 }). When the server does not surface this data the banner still renders with a generic warning. | |
| bannerTitle | string | undefined | Override the default banner title. When omitted the title is generated from the model name. | |
| confirmText | string | undefined | Optional anti-mistake phrase the operator must type before the destroy button enables. Forwarded to ModelActionForm, which renders a TypedConfirmField inside the body and gates submit until the typed value matches. Recommended for bulk destroys (the kit convention is "delete N {model}"). Leave undefined to skip the gate. |
Slots
| Name | Scoped | Description |
|---|---|---|
view-destroy-banner | yes | Override the danger banner shown above the confirmation form. |
Source
client/lib/views/ViewDestroy.vue