ArraySetter
Overview
Displays and edits properties whose type is an array.
Display

Configuration Example
"setter": {
"componentName": "ArraySetter",
"props": {
"itemSetter": {
"componentName": "ObjectSetter",
"props": {
"config": {
"items": [{
"name": "title",
"description": "Title",
"setter": "StringSetter"
},
{
"name": "callback",
"description": "callback",
"setter": {
"componentName": "FunctionSetter"
}
}
]
}
},
"initialValue": {
"title": "I am title",
"callback": null
}
}
}
}
ArraySetter Configuration
| Property | Type | Description |
|---|---|---|
| itemSetter | ObjectSetter | ArraySetter child content must be wrapped with ObjectSetter |
itemSetter Configuration
| Property | Type | Description |
|---|---|---|
| componentName | String | |
| props | ||
| initialValue | Object | Initial value when adding a new item |
ObjectSetter Configuration
| Property | Type | Description |
|---|---|---|
| descriptor | String | The item.key name displayed in the list. Must match a key in config.items[]. Default: "Item X" ![]() |
| config | Object | Configuration |
| config.items | Array | Child property list |
| config.items[].name | String | Child property name |
| config.items[].description | String | Child property description |
| config.items[].setter | Object | String | Child property setter configuration | child property setter component name |
| config.items[].isRequired | Boolean | Whether to enable quick edit for the child property. At most 4 can be enabled ![]() |
| config.items[].condition | Boolean | () => Boolean | Whether to display the property |
| config.items[].getValue | (target, value) => value | Data read hook; can modify retrieved data |
| config.items[].setValue | (target, value) => value | Data write hook; can modify data being set |

