-
-
- {{ i + 1 }}.
- {{ property.items.properties[prop].title }}
-
-
+
+
+ {{ property.items.properties[prop].title }}
+
+
+
- {{ v[prop] }}
+ {{ version[i][prop] }}
-
+
+ —
+
+
diff --git a/ui/src/app/metadata/configuration/component/array-property.component.ts b/ui/src/app/metadata/configuration/component/array-property.component.ts
index ff9cd0ac4..35d50dedd 100644
--- a/ui/src/app/metadata/configuration/component/array-property.component.ts
+++ b/ui/src/app/metadata/configuration/component/array-property.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input } from '@angular/core';
+import { Component, Input, OnChanges } from '@angular/core';
import { Property } from '../../domain/model/property';
import { Observable, of } from 'rxjs';
import { AttributesService } from '../../domain/service/attributes.service';
@@ -10,15 +10,22 @@ import { ConfigurationPropertyComponent } from './configuration-property.compone
styleUrls: []
})
-export class ArrayPropertyComponent extends ConfigurationPropertyComponent {
+export class ArrayPropertyComponent extends ConfigurationPropertyComponent implements OnChanges {
@Input() property: Property;
+ range = [];
+
constructor(
private attrService: AttributesService
) {
super();
}
+ ngOnChanges(): void {
+ const keys = this.property.value.reduce((val, version) => version ? version.length > val ? version.length : val : val, 0);
+ this.range = [...Array(keys).keys()];
+ }
+
get attributeList$(): Observable<{ key: string, label: string }[]> {
if (this.property.widget && this.property.widget.hasOwnProperty('data')) {
return of(this.property.widget.data);
diff --git a/ui/src/app/metadata/configuration/component/metadata-configuration.component.html b/ui/src/app/metadata/configuration/component/metadata-configuration.component.html
index 73979ce40..82034cca4 100644
--- a/ui/src/app/metadata/configuration/component/metadata-configuration.component.html
+++ b/ui/src/app/metadata/configuration/component/metadata-configuration.component.html
@@ -1,5 +1,5 @@