FieldViewModel
FieldViewModel =
object
Defined in: packages/schema/src/model.ts:267
A view’s hints for one field (.fields((r) => ...)); see Names and columns.
Properties
Section titled “Properties”badgeShape?
Section titled “badgeShape?”
optionalbadgeShape?:BadgeShape
Defined in: packages/schema/src/model.ts:298
arrow draws the field’s badges as arrows pointing right, as on a rating scale such as the EU energy label.
decimals?
Section titled “decimals?”
optionaldecimals?:number
Defined in: packages/schema/src/model.ts:287
How many decimals a number shows.
format?
Section titled “format?”
optionalformat?:FieldFormat
Defined in: packages/schema/src/model.ts:277
How the value is shown.
optionalhelp?:string
Defined in: packages/schema/src/model.ts:271
A line under the field on the record page and in forms.
helpWhen?
Section titled “helpWhen?”
optionalhelpWhen?:HelpWhen
Defined in: packages/schema/src/model.ts:273
When help shows: always, or only while the record is edited; the view’s helpWhen when omitted.
optionalicon?:string
Defined in: packages/schema/src/model.ts:292
An icon before the value on a card’s meta row and above it in a section of key facts, by the names actions take
(ruler); an unknown name shows none.
label?
Section titled “label?”
optionallabel?:string
Defined in: packages/schema/src/model.ts:269
What the field is called, instead of its name in words.
markdown?
Section titled “markdown?”
optionalmarkdown?:boolean
Defined in: packages/schema/src/model.ts:281
Markdown: forms edit its source with a preview, and it shows rendered, raw HTML as text.
multiline?
Section titled “multiline?”
optionalmultiline?:boolean
Defined in: packages/schema/src/model.ts:279
A text that runs over several lines: forms edit it in a box that grows with it, and its line breaks show.
prefix?
Section titled “prefix?”
optionalprefix?:string
Defined in: packages/schema/src/model.ts:283
Text before a number wherever it is shown, such as €.
suffix?
Section titled “suffix?”
optionalsuffix?:string
Defined in: packages/schema/src/model.ts:285
Text after a number wherever it is shown, such as a unit: m² shows 120 m².
valueColors?
Section titled “valueColors?”
optionalvalueColors?:Record<string,string>
Defined in: packages/schema/src/model.ts:296
A hex colour per enum value that fills its badge, such as { a: '#00a651' }; a value without one keeps its tone.
valueLabels?
Section titled “valueLabels?”
optionalvalueLabels?:Record<string,string>
Defined in: packages/schema/src/model.ts:294
What an enum value reads as wherever it is shown; a value without one reads as itself in words (enumLabel).
optionalwhen?:ShowWhen
Defined in: packages/schema/src/model.ts:275
When the field shows on the record page: always, the default, only on its form or only on its read view.
widget?
Section titled “widget?”
optionalwidget?:FieldWidgetModel
Defined in: packages/schema/src/model.ts:303
The field type a plugin registers (definePlugin({ fields })) that shows and edits this field, with its props;
without that plugin, or for a storage type it does not show, the field shows as it would without it.