Type Definitions
object
# FieldRenderProps
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string
|
field type | |
label |
string
|
field label | |
name |
string
|
field name | |
hidden |
boolean
|
if the field is hidden | |
required |
boolean
|
<optional> |
if the field is required |
disabled |
boolean
|
if the field is disabled | |
iconHelperText |
string
|
icon helper text | |
helperText |
string
|
helper text | |
requiredErrorText |
string
|
required error text | |
readOnly |
boolean
|
if the field is read only | |
multiple |
boolean
|
<optional> |
if the field is multiple |
placeholder |
string
|
<optional> |
placeholder text |
linkFormat |
object
|
link format | |
choices |
Array.<object>
|
<optional> |
choices for the field |
validations |
YupSchema
|
validations for the field |
object
# FormSection
Properties:
Name | Type | Description |
---|---|---|
name |
string
|
The name of the section |
description |
string
|
The description of the section |
fields |
Array
|
The fields in the section |
visible |
boolean
|
Whether the section is visible |
object
# FormSubmitOptions
Properties:
Name | Type | Description |
---|---|---|
enqueueSnackbar |
function
|
function to enqueue a snackbar |
nav |
function
|
function to navigate to a url |
modifying |
boolean
|
true if the form is currently being modified |
setModifying |
function
|
function to set the modifying state |
object
# ParsedField
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string
|
field id | |
label |
string
|
field label | |
type |
string
|
field type | |
hidden |
boolean
|
if the field is hidden | |
conditions |
Array.<TriggerCondition>
|
if the field is hidden | |
specialProps |
object
|
special props for the field | |
defaultValue |
object
|
<optional> |
default value for the field |
modelData |
object
|
<optional> |
model data for the field (found on the model.data) |
subFields |
Array.<ParsedField>
|
<optional> |
subFields for the field if its type is FIELD_TYPES.CLUSTER (i.e. 100) |
render |
FieldRenderProps
|
render props for the field |
Object
# ParsedFormLayout
Properties:
Name | Type | Description |
---|---|---|
sections |
Array.<ParsedSection>
|
array of parsed sections |
fields |
Map.<String, Object>
|
map of fieldId to field object |
triggerFields |
Map.<String, Object>
|
map of fieldId to field object |
Object
# ParsedSection
Properties:
Name | Type | Description |
---|---|---|
name |
string
|
section name (title and name are both used for backwards compatibility) |
title |
string
|
section title |
fields |
Array.<ParsedField>
|
array of field objects |
editable |
boolean
|
if the section is editable |
enabled |
Array
|
if the section is enabled |
order |
number
|
order of the section |
object
# ProcessedDynamicFormLayout
Properties:
Name | Type | Description |
---|---|---|
defaultValues |
object
|
The default values for the form |
validations |
object
|
The validation schema for the form |
fieldsToWatch |
object
|
The fields that need to be watched for changes |
object
# RowFields
Properties:
Name | Type | Description |
---|---|---|
fields |
Array.<ParsedField>
|
array of fields in the row |
size |
number
|
column size of the row (12 is full width, 6 is half width, etc) |
maxColumns |
number
|
maximum number of columns in the row |
solitary |
boolean
|
true if the row is a solitary field |
isInline |
boolean
|
true if the row is an inline field |
object
# SubmitOptions
Properties:
Name | Type | Description |
---|---|---|
enqueueSnackbar |
function
|
function to enqueue a snackbar |
nav |
function
|
function to navigate to a url |
onSuccess |
function
|
function to call on successful submit (if provided will NOT call setModifying OR nav) |
formatSubmitError |
function
|
function to format the error message |
checkSuccess |
function
|
function to check if the submit was successful |
onError |
function
|
function to call on error (if provided will NOT call setModifying) |
unitLabel |
string
|
label for the unit being submitted |
successUrl |
string
|
url to navigate to on success |
submitUrl |
string
|
url to submit to |
setModifying |
function
|
function to set the modifying state |
formatSubmitMessage |
function
|
function to format the success message |
suppressSuccessToast |
boolean
|
true to suppress the success toast |
suppressErrorToast |
boolean
|
true to suppress the error toast * |
object
# TriggerCondition
Properties:
Name | Type | Description |
---|---|---|
when |
string
|
trigger field id |
is |
string
|
value to trigger on |
then |
object
|
conditions |
isValid |
boolean
|
if the field is valid |
object
# TriggerField
Properties:
Name | Type | Description |
---|---|---|
id |
string
|
field id |
fieldValues |
Map.<string, string>
|
map of field values |
touches |
Map.<string, string>
|
map of fields that trigger field could influence |