import { Meta, Props } from '@storybook/addon-docs/blocks'; import { FieldArray } from './FieldArray'; # FieldArray `FieldArray` provides a way to render a list of dynamic inputs. It exposes the functionality of `useFieldArray` in [react-hook-form](https://react-hook-form.com/advanced-usage/#FieldArrays). `FieldArray` must be wrapped at some level by a `
` element. ### Usage ```jsx import { Form, FieldArray } from '@grafana/ui'; ({control, register}) => ( {({ fields, append }) => (
{fields.map((field, index) => (
))}
)}
)
; ``` ### FieldArray API The `FieldArray` component exposes its API via render prop. Properties exposed are: `fields`, `append`, `prepend`, `remove`, `swap`, `move`, `insert` ### Props