Skip to content

ViewUpdate

Overview

Editable detail view that loads a model instance, presents it in a form, and submits changes back to the server on save.

Theme entry: ViewUpdate

Props

NameTypeRequiredDefaultDescription
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 used to resolve API endpoints and configuration.
pkstringyesPrimary key of the object instance to fetch and edit.
submitFieldsarrayundefinedField names included in the update submission payload; falls back to the model config's submitFields.
redirectAfterstringnullNamed view to redirect to after a successful update; null stays on the current page.
classstring|array|object() => []CSS class(es) applied to the outermost root element.
formModelVariantstring"default"Theme variant forwarded to the inner FormModel component.
fieldsarrayundefinedField names to render in the form; overrides the model config default.
fieldDetailsobjectundefinedMap of field paths to field detail overrides.
expandarrayundefinedField names to render in expanded (inline) mode.
expandDetailsobjectundefinedMap of expand field paths to detail overrides.
fieldComponentsobjectundefinedMap of field paths to async functions returning an override field component.
widgetComponentsobjectundefinedMap of field paths to async functions returning an override widget component.
formPropsobjectundefinedExtra props merged into the FormModel component.
fieldPropsobjectundefinedMap of field paths to additional props passed to the field component.
widgetPropsobjectundefinedMap of field paths to additional props passed to the widget component.
relatedObjectRulesobject{}Rules mapping related object keys to fetch data alongside the main object.
calculatedObjectRulesobject{}Rules mapping calculated object keys to derive computed data alongside the main object.
fetchFieldsarrayundefinedField names to request from the API when fetching the object; overrides the model config default.

Slots

NameScopedDescription
targetless-action-buttonyes
extra-buttonsAdditional action buttons appended in the page title action area.
submit-buttonyesOverride the submit button shown in the sticky action bar.
action-buttonyesOverride an individual action link button in the sticky bar.
transition-buttonyesOverride an individual workflow transition button in the sticky bar.
form-confirm-dialog-warningsyes
warning-entryyes

Full slot reference

Events

NameDescription
object
loading
related-object
calculated-object
form-object
form-context

Full event reference

Source

client/lib/views/ViewUpdate.vue

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