Interface: FormViewerProps
Form viewer React component properties.
Properties
actions?
optionalactions:CustomActions
Custom actions for the form viewer.
componentWrapper?
optionalcomponentWrapper:ComponentType<any>
The React component that wraps every component in a form. Internal use only.
context?
optionalcontext:any
The arbitrary user context.
disabled?
optionaldisabled:boolean
If true, the form is disabled.
errors?
optionalerrors:Record<string,unknown>
The form validation errors.
errorWrapper?
optionalerrorWrapper:ComponentType<ErrorWrapperProps>
The default error wrapper used when errorType is not specified in the form.
formName?
optionalformName:string
The form name. Updating the value triggers the FormViewerProps.getForm function.
formOptions?
optionalformOptions:any
The form options. Used to transfer any options to the FormViewerProps.getForm function. Updating the value triggers the FormViewerProps.getForm function.
formValidators?
optionalformValidators:FormValidators
The set of functions that validate the form data.
getForm()?
optionalgetForm: (name?,options?) =>string|Promise<string>
Loads the form.
Parameters
name?
string
the form name.
options?
any
the form options.
Returns
string | Promise<string>
the string or Promise with the form.
initialData?
optionalinitialData:Record<string,unknown>
The initial data of the form.
language?
optionallanguage:`${string}-${string}`
The language of the form, e.g. 'en-US'.
localizationEngine?
optionallocalizationEngine:ILocalizationEngine
The localization engine used by the viewer.
localize?
optionallocalize:ComponentLocalizer
The function to localize the properties of a component.
onFormDataChange()?
optionalonFormDataChange: (data) =>void
The event is called whenever a form data changes.
Parameters
data
the IFormData with all the form data.
Returns
void
readOnly?
optionalreadOnly:boolean
If true, the form is read-only.
showAllValidationErrors?
optionalshowAllValidationErrors:boolean
If true, all validation errors will be displayed.
validators?
optionalvalidators:Partial<Record<keyofSchemaTypeMap,CustomValidationRules>>
The set of metadata of validation rules, grouped by the type of value being validated.
view
view:
IView
All the metadata of the components of the form viewer.
viewerRef?
optionalviewerRef:ForwardedRef<IFormViewer>
The reference to IFormViewer.
viewMode?
optionalviewMode:ViewMode
Display resolution type.