ListField

Source
import { ListField } from "@prestojs/viewmodel";
ListField<T,ParsableType = T>
Hierarchy
  • Field<T[],ParsableType[],T>
  • ListField

API

Constructor

new ListField(props)
Params:
ParameterTypeDescription
*props

Methods

clone()
Returns:Field
contributeToClass(viewModel)
Params:
ParameterTypeDescription
*viewModelViewModelConstructor
Returns:void
format(value)
Params:
ParameterTypeDescription
*valueT[]
Returns:any
getFormatterProps()
Returns:{[fieldName: string]: any }
getWidgetProps()
Returns:{[fieldName: string]: any }
isEqual(value1,value2)
Params:
ParameterTypeDescription
*value1T[]
*value2T[]
Returns:boolean
normalize(value)
Params:
ParameterTypeDescription
*valueany
Returns:null|T[]
parse(value)
Params:
ParameterTypeDescription
*valuenull|ParsableType[]
Returns:null|T[]
toJS(value)
Params:
ParameterTypeDescription
*valueT[]
Returns:null|string|number|Record
toString()
Returns:string

Properties

blank

Source
boolean

blankAsNull

Source
boolean

boundRecord

Source
undefined|ViewModelInterface

childField

Source
Field

choices

Source
Map

defaultValue

Source
undefined|null|T[]|Promise

formatterProps

Source
Record

helpText

Source
string

isBound

Source
boolean

label

Source
string

name

Source
string

readOnly

Source
boolean

value

Source
undefined|T[]

widgetProps

Source
Record

writeOnly

Source
boolean

Static Properties

fieldClassName

Source
string