ColumnModelLink
Overview
Foreign-key list column adapter. Renders the related object as a link to its detail view via {@link LinkModelView}, falling back to plain label text when the link target or pk is unavailable. Collapses the hand-written FK-link boilerplate (target/pk/label resolution + no-pk guard) that consuming list views previously repeated per column.
Receives the ObjectsGrid value slot props. Note the cell's pk slot prop is the row primary key, not the FK target; the target pk is derived from value, so pk is intentionally not consumed here. inheritAttrs is disabled so surplus cell-context props are not leaked as DOM attributes.
Target resolution prefers the field's own related-model identity (populated by the server for writable relations) and falls back to app/model supplied via columnProps, then to label-only text.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| value | string|number|object|array | undefined | Raw FK value: a scalar pk, or an object carrying id/pk and an optional label. | |
| formatted | string|number | "" | Server-formatted display string for the cell; preferred label source. | |
| field | object | {} | The column's field descriptor; read for the related model's appLabel/model. | |
| app | string | undefined | Related model's app label; columnProps fallback when the field omits it. | |
| model | string | undefined | Related model name; columnProps fallback when the field omits it. | |
| view | string|array|object | "read" | Named view to link to. | |
| label | string|number | undefined | Explicit label override; otherwise derived from formatted/value. | |
| button | boolean | false | Render the link as a standard button instead of a link-styled button. |
Source
client/lib/objects-grid/ColumnModelLink.vue