Skip to main content

Interface: FieldType<TValue>

Defined in: model/field.ts:276

A stored-Field bundle applied by name (construction's fieldTypes option, type: 'percent') or inline (type: currency({ code: 'EUR' })) to many Fields — key, type and the compute/rollUp/editable discriminants left out. Written directly rather than derived from Field with Omit: Omit does not distribute over a union, so it would collapse to the two arms' common keys and drop equals/parseValue/inputType — percent (field-types.ts) needs parseValue and inputType on its own bundle.

Type Parameters​

TValue​

TValue = unknown

Properties​

column?​

optional column?: Omit<GridColumnBase, "field" | "columnRenderer" | "headerRenderer" | "toggle" | "hidden"> & GridColumnSizing

Defined in: model/field.ts:287


editable?​

optional editable?: boolean | FieldEditable

Defined in: model/field.ts:281

Read Field.editable for the three states. A Field naming this type may override it.


inputType?​

optional inputType?: "number" | "text" | "email" | "tel" | "url" | "checkbox"

Defined in: model/field.ts:286


rollUp?​

optional rollUp?: AggregatorName

Defined in: model/field.ts:279

A Field naming this type may still override it — { key: 'cost', type: 'money', rollUp: 'none' } opts one Field on a shared type out.

Methods​

compare()?​

optional compare(a, b): number

Defined in: model/field.ts:283

Parameters​

a​

TValue | undefined

b​

TValue | undefined

Returns​

number


equals()?​

optional equals(a, b): boolean

Defined in: model/field.ts:282

Parameters​

a​

TValue | undefined

b​

TValue | undefined

Returns​

boolean


formatValue()?​

optional formatValue(value, ctx, entry): string

Defined in: model/field.ts:284

Parameters​

value​

TValue | undefined

ctx​

FormatContext

entry​

Entry

Returns​

string


parseValue()?​

optional parseValue(text, ctx, entry): TValue | undefined

Defined in: model/field.ts:285

Parameters​

text​

string

ctx​

FieldContext

entry​

Entry

Returns​

TValue | undefined