---
url: "https://vueda.dev/v3/reference/api/vue/ColumnModelLink.md"
title: "ColumnModelLink"
---

# 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 |
| --- | --- | --- | --- | --- |
| <span id="prop-value">value</span> | `string\|number\|object\|array` |  | `undefined` | Raw FK value: a scalar pk, or an object carrying `id`/`pk` and an optional label. |
| <span id="prop-formatted">formatted</span> | `string\|number\|object\|array` |  | `""` | The cell's display value; the label when it is a string or number. A list cell passes the raw value here when the field does not name a formatted path, so an expanded object is skipped. |
| <span id="prop-field">field</span> | `object` |  | `{}` | The column's field descriptor; read for the related model's `appLabel`/`model`. |
| <span id="prop-app">app</span> | `string` |  | `undefined` | Related model's app label; `columnProps` fallback when the field omits it. |
| <span id="prop-model">model</span> | `string` |  | `undefined` | Related model name; `columnProps` fallback when the field omits it. |
| <span id="prop-view">view</span> | `string\|array\|object` |  | `"read"` | Named view to link to. |
| <span id="prop-label">label</span> | `string\|number` |  | `undefined` | Explicit label override; otherwise derived from `formatted`/`value`. |
| <span id="prop-button">button</span> | `boolean` |  | `false` | Render the link as a standard button instead of a link-styled button. |

## Source

`client/lib/objects-grid/ColumnModelLink.vue`
