Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Interface: IDataContext

The context for working with data.

Accessors

initialData

Get Signature

get initialData(): unknown

Returns

unknown

the initial data.

Methods

calculateValue()

calculateValue(component, key): [boolean, any?]

Calculates the value for the field.

Parameters

component: ComponentStore

the component settings.

key: string

the field's key.

Returns

[boolean, any?]


createDataValidator()

createDataValidator(componentStore, valueType, onError): DataValidator

Creates a data validator for the field.

Parameters

componentStore: ComponentStore

the component settings.

valueType: keyof SchemaTypeMap

the field's data type.

onError: Setter<undefined | string>

the callback function called when the validation error text is set.

Returns

DataValidator