diff --git a/src/components/drawer/ComponentDetailPanel.vue b/src/components/drawer/ComponentDetailPanel.vue index 254e47ceb..d588be8d6 100644 --- a/src/components/drawer/ComponentDetailPanel.vue +++ b/src/components/drawer/ComponentDetailPanel.vue @@ -176,7 +176,9 @@ function getAttributeByDefinition(component, definition) { name: definition.name, type: getComponentValueType(definition), definition, - value: definition.type === 'Object' ? [] : null, + value: definition.type === 'Object' + || (definition.type === 'Array' && definition.itemType === 'Object') + ? [] : null, }); } diff --git a/src/components/inputs/ArrayOfObjectsInput.vue b/src/components/inputs/ArrayOfObjectsInput.vue new file mode 100644 index 000000000..5d13bca6b --- /dev/null +++ b/src/components/inputs/ArrayOfObjectsInput.vue @@ -0,0 +1,241 @@ + + + + + + + + + {{ attribute.definition?.displayName || attribute.name }} + + + + + + + + No objects present yet, click on the button to add one! + + + + updateObject(index, event)" + /> + + + Delete Object + + + + + + Add an Object + + + + + + + + diff --git a/src/components/inputs/AttributesList.vue b/src/components/inputs/AttributesList.vue index 0fd27cfae..173b89a54 100644 --- a/src/components/inputs/AttributesList.vue +++ b/src/components/inputs/AttributesList.vue @@ -3,7 +3,8 @@ @@ -35,14 +36,26 @@ @click="addAttribute" /> - + +