Class: Field

Description

Field definition for the field on the data item's type. The main purpose is to map that field to a Column.

Properties

PropertyTypeDescription
fieldNamestringThe name of the field. This should be unique across all fields on the data grid.
If valueGetter is not specified the field name is also assumed to be the property
name of the desired value on the data item and is used to retrieve the value from the
data item using a direct string index.
valueGetter?FieldValueGetterAn optional callback function to map how to retrieve and/or format the columns
value from the data item. Using this callback will include any data modifications or formatting
in sorting and filtering. Similar mapping and formatting could be done with the
cell template slot (i.e. cell-${column.field.fieldName}) but those changes will not
be included in any sorting or filtering.

Constructors

new Field(fieldName, valueGetter)

new Field(fieldName, valueGetter?): Field

Parameters

ParameterType
fieldNamestring
valueGetter?FieldValueGetter

Returns

Field

Methods

resolveValue()

resolveValue(dataItem): any

Parameters

ParameterType
dataItemany

Returns

any