Skip to main content

ArraySetter

Overview

Displays and edits properties whose type is an array.

Display

image.png

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

PropertyTypeDescription
itemSetterObjectSetterArraySetter child content must be wrapped with ObjectSetter

itemSetter Configuration

PropertyTypeDescription
componentNameString
props
initialValueObjectInitial value when adding a new item

ObjectSetter Configuration

PropertyTypeDescription
descriptorStringThe item.key name displayed in the list. Must match a key in config.items[]. Default: "Item X" image.png
configObjectConfiguration
config.itemsArrayChild property list
config.items[].nameStringChild property name
config.items[].descriptionStringChild property description
config.items[].setterObject | StringChild property setter configuration | child property setter component name
config.items[].isRequiredBooleanWhether to enable quick edit for the child property. At most 4 can be enabled image.png
config.items[].conditionBoolean | () => BooleanWhether to display the property
config.items[].getValue(target, value) => valueData read hook; can modify retrieved data
config.items[].setValue(target, value) => valueData write hook; can modify data being set