Skip to content

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

NameTypeRequiredDefaultDescription
iconOverrideObjectnullA partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants.
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name whose instances will be permanently deleted.
pkstring|arrayyesPrimary key or array of primary keys identifying the instances to delete.
linkedObjectCountsarray[]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.
bannerTitlestringundefinedOverride the default banner title. When omitted the title is generated from the model name.
confirmTextstringundefinedOptional 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

NameScopedDescription
view-destroy-banneryesOverride the danger banner shown above the confirmation form.

Full slot reference

Source

client/lib/views/ViewDestroy.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2