NumberDataField

This field class handles field of type Number.

class Person extends Model {
    static get fields() {
        return [
            'name',
            { name : 'age', type : 'number' }
        ];
    }
}

When a field is declared as a 'number', non-null values are promoted to Number type. This is seldom required, but can be useful if a field value is received as a string but should be treated as a number.

Configs

19
nullValue: Number= 0

The value to replace null when the field is not nullable.

precision: Number

The numeric precision of this field. Values are rounded to the specified number of digits. If null, the default, no rounding is performed.

alwaysWriteDataField
calculateDataField
columnDataField
compareDataField
dataSourceDataField
defaultValueDataField
descriptionDataField
internalDataField
labelDataField
nameDataField
nullableDataField
nullTextDataField
persistDataField
readOnlyDataField

Properties

7

Class hierarchy

isNumberDataField: Boolean= truereadonly
Identifies an object as an instance of NumberDataField class, or subclass thereof.
isNumberDataField: Boolean= truereadonlystatic
Identifies an object as an instance of NumberDataField class, or subclass thereof.
isDataFieldDataField

Lifecycle

configBase

Functions

19

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase

Other

convertDataField
isEqualDataField
printDataField
printValueDataField
serializeDataField