FileField

Source
import { FileField } from "@prestojs/viewmodel";
Hierarchy

API

Constructor

new FileField(?options)
Params:
ParameterTypeDescription
options
An object with the properties below
options.asyncChoicesAsyncChoicesInterface
options.blankboolean
options.blankAsNullboolean
options.choicesMap|[File, string][]
options.defaultValuenull|File|
options.formatterPropsRecord
options.helpTextstring
options.labelstring
options.readOnlyboolean
options.widgetPropsRecord
options.writeOnlyboolean

Methods

clone()
Returns:Field
contributeToClass(viewModel)
Params:
ParameterTypeDescription
*viewModelViewModelConstructor
Returns:void
format(value)
Params:
ParameterTypeDescription
*valueFile
Returns:any
getFormatterProps()
Returns:{[fieldName: string]: any }
getWidgetProps()
Returns:{[fieldName: string]: any }
isEqual(value1,value2)
Params:
ParameterTypeDescription
*value1File
*value2File
Returns:boolean
normalize(value)
Params:
ParameterTypeDescription
*valueFile
Returns:null|File
parse(value)
Params:
ParameterTypeDescription
*valuenull|File
Returns:null|File
toJS(value)
Params:
ParameterTypeDescription
*valueFile
Returns:null|string|number|Record
toString()
Returns:string

Properties

blank

Source
boolean

blankAsNull

Source
boolean

boundRecord

Source
undefined|ViewModelInterface

choices

Source
Map

defaultValue

Source
undefined|null|File|Promise

formatterProps

Source
Record

helpText

Source
string

isBound

Source
boolean

label

Source
string

name

Source
string

readOnly

Source
boolean

value

Source
undefined|File

widgetProps

Source
Record

writeOnly

Source
boolean

Static Properties

fieldClassName

Source
string