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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| 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 used to resolve API endpoints and configuration. | |
| pk | string | yes | Primary key of the object instance to fetch and edit. | |
| submitFields | array | undefined | Field names included in the update submission payload; falls back to the model config's submitFields. | |
| redirectAfter | string | null | Named view to redirect to after a successful update; null stays on the current page. | |
| class | string|array|object | () => [] | CSS class(es) applied to the outermost root element. | |
| formModelVariant | string | "default" | Theme variant forwarded to the inner FormModel component. | |
| fields | array | undefined | Field names to render in the form; overrides the model config default. | |
| fieldDetails | object | undefined | Map of field paths to field detail overrides. | |
| expand | array | undefined | Field names to render in expanded (inline) mode. | |
| expandDetails | object | undefined | Map of expand field paths to detail overrides. | |
| fieldComponents | object | undefined | Map of field paths to async functions returning an override field component. | |
| widgetComponents | object | undefined | Map of field paths to async functions returning an override widget component. | |
| formProps | object | undefined | Extra props merged into the FormModel component. | |
| fieldProps | object | undefined | Map of field paths to additional props passed to the field component. | |
| widgetProps | object | undefined | Map of field paths to additional props passed to the widget component. | |
| relatedObjectRules | object | {} | Rules mapping related object keys to fetch data alongside the main object. | |
| calculatedObjectRules | object | {} | Rules mapping calculated object keys to derive computed data alongside the main object. | |
| fetchFields | array | undefined | Field names to request from the API when fetching the object; overrides the model config default. |
Slots
| Name | Scoped | Description |
|---|---|---|
targetless-action-button | yes | |
extra-buttons | Additional action buttons appended in the page title action area. | |
submit-button | yes | Override the submit button shown in the sticky action bar. |
action-button | yes | Override an individual action link button in the sticky bar. |
transition-button | yes | Override an individual workflow transition button in the sticky bar. |
form-confirm-dialog-warnings | yes | |
warning-entry | yes |
Events
| Name | Description |
|---|---|
object | |
loading | |
related-object | |
calculated-object | |
form-object | |
form-context |
Source
client/lib/views/ViewUpdate.vue