Array Component
The Array (array
) component handles dynamic arrays of form fields, allowing users to add, remove, and manage items in the array and also support nested arrays. It uses Material-UI's Accordion
component for better organization and user experience.
Schema
warning
Avoid using dot (.) in the name property as it can cause issues with nested field paths in the form state.
Examples of accepted naming convension:
- obj_item
- objItem1
- anyname
Examples
A simple array with text and number fields.
Form Data:
{}
Props
Meta Object
The Meta (meta
) object contains properties that define the display characteristics and behavior of the ArrayField
section.
Key | Description | Type |
---|---|---|
displayName | The name to display as the section header | string |
htmlProps | Properties for HTML behavior, like allowDynamic and allowAdd | object |
children | Array of child fields contained within the ArrayField | array |
max | Maximum number of items allowed in the array | number |
displayType | Type of the field display, which is "array" in this case | string |
allowAdd | Defines whether new items can be added to the array. | boolean |
allowDynamic | Enable Static or dynamic input for array input | boolean |
readOnly | A readonly field is not editable and value cannot be changed | boolean |