Skip to content
Snippets Groups Projects
Commit d8b5b822 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Fix: Correct init circling

parent 98c8aff0
Branches
Tags
1 merge request!101Fix: Correct init circling
...@@ -409,8 +409,8 @@ export default defineComponent({ ...@@ -409,8 +409,8 @@ export default defineComponent({
this.initFixedValues(); this.initFixedValues();
}, },
metadata() { metadata() {
this.setValuesFromMetadataValues();
this.initMetadata(); this.initMetadata();
this.setValuesFromMetadataValues();
}, },
}, },
beforeMount() { beforeMount() {
...@@ -481,12 +481,15 @@ export default defineComponent({ ...@@ -481,12 +481,15 @@ export default defineComponent({
}, },
initMetadata() { initMetadata() {
// Set values if they don't exist // Set values if they don't exist
if (!this.values.length) {
this.values = [...this.metadataValues];
if (!this.values.length) { if (!this.values.length) {
const numberOfNewFields = 1; const numberOfNewFields = 1;
// Setting more than one will not work since a dataset does not support multiple triples // Setting more than one will not work since a dataset does not support multiple triples
// which are the same ?s ?p ?o // which are the same ?s ?p ?o
this.insertNewFields(numberOfNewFields); this.insertNewFields(numberOfNewFields);
} }
}
}, },
input(values: Quad_Object[], fixedValueTransfer = true) { input(values: Quad_Object[], fixedValueTransfer = true) {
this.$emit('input', this.nodeName, values); this.$emit('input', this.nodeName, values);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment