IntegerField

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

Examples

Default widget in a Form

Default formatter for IntegerField

API

Constructor

new IntegerField(?values)
Source

Arguments:

ArgumentTypeDescription
values
An object with the properties below
values.asyncChoicesAsyncChoicesInterface
values.blankboolean
values.blankAsNullboolean
values.choices|[ValueT, string][]
values.defaultValuenull|ValueT|
values.formatterPropsRecord
values.helpTextstring
values.labelstring
values.maxValuestring|number
values.minValuestring|number
values.readOnlyboolean
values.widgetPropsRecord
values.writeOnlyboolean

Methods

clone()
Source
Returns:Field
contributeToClass(viewModel)
Source

Arguments:

ArgumentTypeDescription
*viewModelViewModelConstructor
Returns:void
format(value)
Source

Arguments:

ArgumentTypeDescription
*valuenumber
Returns:any
getFormatterProps()
Source
Returns:{[fieldName: string]: any }
getWidgetProps()
Source
Returns:{[fieldName: string]: any }
isEqual(?value1,?value2)
Source

Arguments:

ArgumentTypeDescription
value1number
value2number
Returns:boolean
normalize(value)
Source

Arguments:

ArgumentTypeDescription
*valuestring|number
Returns:null|number
parse(value)
Source

Arguments:

ArgumentTypeDescription
*valueany
Returns:null|number
toJS(value)
Source

Arguments:

ArgumentTypeDescription
*valuenumber
Returns:null|string|number|Record
toString()
Source
Returns:string

Properties

blank

Source
boolean

blankAsNull

Source
boolean

boundRecord

Source
undefined|ViewModelInterface

choices

Source

defaultValue

Source
undefined|null|ValueT|Promise

formatterProps

Source
Record

helpText

Source
string

isBound

Source
boolean

label

Source
string

maxValue

Source
string|number

minValue

Source
string|number

name

Source
string

readOnly

Source
boolean

value

Source
undefined|ValueT

widgetProps

Source
Record

writeOnly

Source
boolean

Static Properties

fieldClassName

Source
string