Exposed props
Wrapping a React component in createField
high-order component automatically exposes the properties listed below. These properties can be used for field styling and custom logic or behavior.
Props list
Prop name | Type | Description |
|
| Object of essential props for the primitive field components (i.e. input, select, textarea, etc). |
|
| Object representing a field's state. |
fieldProps
are composed from thefieldState
and are exposed separately to ease the process of props assignment to the form elements.
fieldState
fieldState
Object representing a field's state.
General
Prop name | Type | Description |
|
| Indicates whether the field has been interacted with. |
|
| Indicates whether the field is required. |
|
| Indicates whether the field is disabled. |
|
| Indicates whether the field should be skipped during any serialization process. Read more about |
Validity state
Prop name | Type | Description |
|
| Indicates whether the field has passed all the validations. |
|
| Indicates whether the field has not passed all the validations. |
Validation
Prop name | Type | Description |
|
| Indicates whether the field is being validated at the moment. |
|
| Collection of the validation errors relative to the fields at the given point of time. |
|
| Indicates that the field has been validated, regardless of the validation type and status. |
|
| Indicates whether the field has been validated synchronously. |
|
| Indicates whether the field is valid relatively to its synchronous validation rules. |
|
| Indicates whether the field has been validated asynchronously. |
|
| Indicates whether the field is valid relatively to its asynchronous validation rules. |
Example
Exposed props can be accessed in this.props
of your component.
Last updated