@crustack/form
Field Arrays
Learn how to manage field arrays.
The FieldArray component simplifies working with arrays of fields as it supports index-based field access (e.g. 'fieldname.0').
To validate the entire array, provide a validate prop to form.FieldArray and place a form.ErrorMessage component below it.
The array is marked as touched when any of its child fields is touched.
1. Basic example
The following example demonstrates a basic usage of the FieldArray component.
2. With insert / delete
This example demonstrates how to insert and delete items from the array.