Documentation
    Preparing search index...

    Interface BasePropertyType

    Configuration dictionary for instantiating a BaseProperty. Defines the behavior, constraints, and default state of a property within a Quatrain DataObject.

    Parameter Type Description Default
    name string The canonical name of the property. Required
    id string The internal identifier (defaults to lowercase name). name.toLowerCase()
    parent DataObjectClass The parent object containing this property. undefined
    protected boolean If true, the value can only be set once and becomes read-only. false
    mandatory boolean If true, the property must have a value before saving. false
    defaultValue any The default value or a function returning the default value. undefined
    htmlType PropertyHTMLType The suggested HTML input type for rendering in a UI. 'off'
    onChange function Callback triggered whenever the property value is modified. undefined
    interface BasePropertyType {
        defaultValue?: any;
        htmlType?: PropertyHTMLType;
        id?: string;
        mandatory?: boolean;
        name: string;
        onChange?: (dao: DataObjectClass<any>) => DataObjectClass<any>;
        parent?: DataObjectClass<any>;
        protected?: boolean;
        type?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    defaultValue?: any
    htmlType?: PropertyHTMLType
    id?: string
    mandatory?: boolean
    name: string
    onChange?: (dao: DataObjectClass<any>) => DataObjectClass<any>
    parent?: DataObjectClass<any>
    protected?: boolean
    type?: string