DictionaryInputcomponent

DictionaryInput(props: DictionaryInputProps<T>): ReactElement
ParamType
propsDictionaryInputProps<T>
Props for DictionaryInput, a repeating input that edits a dictionary of schema-validated items. required
    .onestring
    .manystring
    .minnumber
    .maxnumber
    .itemsSchema<T>
Schema for the items in the repeater. required
Return
ReactElement
Element rendering one key/value row per entry plus add/clear controls.

Repeating input that edits a dictionary, with an editable key and schema-validated value per entry.

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

Examples

<DictionaryInput name="meta" items={STRING} value={meta} onValue={setMeta} />