ArrayInputcomponent

ArrayInput(props: ArrayInputProps<T>): ReactElement
ParamType
propsArrayInputProps<T>
Props for ArrayInput, a repeating input that edits an array of schema-validated items. required
    .onestring
    .manystring
    .minnumber
    .maxnumber
    .itemsSchema<T>
Schema for the items in the repeater. required
Return
ReactElement
Element rendering one input row per array item plus add/clear controls.

Repeating input that edits an array of items, adding a SchemaInput row per item.

  • Each item is validated and rendered using the supplied items schema.
  • Enforces min/max length and offers add, remove, and clear controls.

Examples

<ArrayInput name="tags" items={STRING} value={tags} onValue={setTags} />