FieldArrayRenderProps
Represents the props that are passed to the component which is rendered by FieldArray.
Name | Type | Default | Description |
---|---|---|---|
children |
|
Represents the children that are passed to the FieldArray. | |
modified |
|
Indicates if the field is modified.
The modified state is set to | |
name |
|
The name of the field in the Form state. | |
touched |
|
Indicates if the field is touched.
The touched state is set to | |
valid |
|
A calculated property based on whether | |
validationMessage |
|
Represents the error message that is returned by the validator.
The FieldArray is considered valid if the | |
value |
|
Represents the current value of the FieldArray (see example). | |
visited |
|
Indicates if the field is visited.
The visited state is set to |
Methods
onInsert | ||||||
---|---|---|---|---|---|---|
A callback to insert value at given index of the array. | ||||||
|
onMove | ||||||
---|---|---|---|---|---|---|
A callback to move a value from one index to another. Useful for drag and drop reordering. | ||||||
|
onPop | ||||
---|---|---|---|---|
A callback to remove a value from the end of the array. The value is returned. | ||||
|
onPush | ||||||
---|---|---|---|---|---|---|
A callback to add a value to the end of the array. | ||||||
|
onRemove | ||||||
---|---|---|---|---|---|---|
A callback to remove a value from given index of the array. | ||||||
| ||||||
|
onReplace | ||||||
---|---|---|---|---|---|---|
A callback to replace value at given index of the array. | ||||||
|
onUnshift | ||||||
---|---|---|---|---|---|---|
A callback to add a value to the beginning of the array. | ||||||
| ||||||
|