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.

Contributes its own page title ("Delete Widget", or "Delete 3 Widgets" for a bulk destroy) through {@link usePageTitle}, so the layout's PageTitle display renders a heading here as it does on the other CRUD views.

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.
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
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
return-buttonyes
view-destroy-banneryesOverride the danger banner shown above the selected records.

Full slot reference

Source ​

client/lib/views/ViewDestroy.vue