BooleanDataField

This field class handles field of type Boolean.

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

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

Configs

18
nullValue: Boolean= false

The value to replace null when the field is not nullable. To automatically convert null or undefined to false, set nullable to false.

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

Properties

7

Class hierarchy

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

Lifecycle

configBase

Functions

19

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase

Other

convertDataField
isEqualDataField
printDataField
printValueDataField
serializeDataField