DictionaryInputcomponent
DictionaryInput(props: DictionaryInputProps<T>): ReactElement
| Param | Type | |
|---|---|---|
props | DictionaryInputProps<T> | Props for DictionaryInput, a repeating input that edits a dictionary of schema-validated items. required |
.one | string | |
.many | string | |
.min | number | |
.max | number | |
.items | Schema<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
itemsschema. - Enforces
min/maxentry count and offers add, remove, and clear controls.
Examples
<DictionaryInput name="meta" items={STRING} value={meta} onValue={setMeta} />