Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: Annotation

@react-form-builder/core.Annotation

Basic metadata class for a React component property for the form builder.

Hierarchy

Constructors

constructor

new Annotation(key, name)

Creates metadata for a React component property.

Parameters

NameTypeDescription
keystringthe property name.
namestringthe human-readable property name.

Properties

calculable

Readonly calculable: boolean = true

True if the property value can be a calculated property, false otherwise.


default

Optional Readonly default: any

The default property value.


editor

Readonly editor: string

The name of the component's property editor.


editorProps

Optional Readonly editorProps: any

Additional properties for the component property editor.


errorMap

Optional Readonly errorMap: ErrorMap

Message and/or error code for the validation function.


hint

Optional Readonly hint: ReactNode

The hint for the component property.


key

Readonly key: string

The component property key.


localizable

Readonly localizable: boolean = false

True if the property value can be localized, false otherwise.


name

Readonly name: string

The component property name.


required

Readonly required: boolean = false

True if the component property is required, false otherwise.


slotConditionBuilder

Optional Readonly slotConditionBuilder: (props: any) => string

Type declaration

▸ (props): string

A function that returns a string containing the source code of the function to bind child components.

Parameters
NameTypeDescription
propsanythe properties of the component, which are available only inside Form Builder Designer.
Returns

string


type

Optional Readonly type: keyof SchemaTypeMap

The data type for the value of the property.


validator

Optional Readonly validator: RuleValidator

The function for validating the property value.


valued

Readonly valued: boolean = false

True if the property value is bound to form data, false otherwise.

Methods

clone

clone(): any

Returns

any

the metadata clone.