Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: FormViewerPropsStore

Represents the props passed to the FormViewer Store. Internal use only.

Constructors​

Constructor​

new FormViewerPropsStore(formViewerProps): FormViewerPropsStore

Constructs a new FormViewerPropsStore from the given FormViewerProps.

Parameters​

formViewerProps​

FormViewerProps

the FormViewer props.

Returns​

FormViewerPropsStore

the FormViewerPropsStore.

Properties​

actions?​

optional actions?: ActionValues

Custom actions for the form viewer.


context?​

optional context?: any

The arbitrary internal context.


disabled?​

optional disabled?: boolean

If true, the form is disabled.


errorWrapper?​

optional errorWrapper?: ComponentType<ErrorWrapperProps>

The default error wrapper used when errorType is not specified in the form.


formValidators?​

optional formValidators?: FormValidators

The set of functions that validate the form data.


initialData​

initialData: Record<string, unknown> = {}

The initial form data.


initialState​

initialState: Record<string, unknown> = {}

The initial user-defined state.


localizationEngine?​

optional localizationEngine?: ILocalizationEngine

The localization engine provided via FormViewer props.


localizer?​

optional localizer?: ComponentLocalizer

The function to localize the properties of a component.


propsLanguage?​

optional propsLanguage?: `${string}-${string}`

The full language code passed in the FormViewer properties, e.g. 'en-US'.


readOnly?​

optional readOnly?: boolean

If true, the form is read-only.


showAllValidationErrors?​

optional showAllValidationErrors?: boolean

If true, all validation errors will be displayed.


userContext?​

optional userContext?: unknown

The arbitrary user context passed via props. This value is not observable and is intended to be non-reactive.


validators?​

optional validators?: Partial<Record<keyof SchemaTypeMap, CustomValidationRules>>

The set of metadata of validation rules, grouped by the type of value being validated.


view​

view: IView

The metadata of the form viewer components.

Methods​

applyProps()​

applyProps(formViewerProps): void

Applies the given FormViewerProps.

Parameters​

formViewerProps​

FormViewerProps

the properties to apply.

Returns​

void


clone()​

clone(): FormViewerPropsStore

Returns the clone of the FormViewerPropsStore object.

Returns​

FormViewerPropsStore

the clone of the FormViewerPropsStore object.