import { FC, ReactElement } from 'react'; import { InputProps } from '../../../features/core'; /** * To edit arrays of data embedded inside a record, creates a list of sub-forms. * * @example * * import { ArrayInput, SimpleFormIterator, DateInput, TextInput } from '../../app'; * * * * * * * * * allows the edition of embedded arrays, like the backlinks field * in the following post record: * * { * id: 123 * backlinks: [ * { * date: '2012-08-10T00:00:00.000Z', * url: 'http://example.com/foo/bar.html', * }, * { * date: '2012-08-14T00:00:00.000Z', * url: 'https://blog.johndoe.com/2012/08/12/foobar.html', * } * ] * } * * expects a single child, which must be a *form iterator* component. * A form iterator is a component accepting a fields object as passed by * react-final-form-arrays's useFieldArray() hook, and defining a layout for * an array of fields. For instance, the component * displays an array of fields in an unordered list (
    ), one sub-form by * list item (
  • ). It also provides controls for adding and removing * a sub-record (a backlink in this example). * * @see https://github.com/final-form/react-final-form-arrays */ export declare const ArrayInput: FC; export declare const getArrayInputError: (error: any) => any; export interface ArrayInputProps extends InputProps { children: ReactElement; disabled?: boolean; }