diff --git a/src/views/admin/components/edition/metadatum-edition-form.vue b/src/views/admin/components/edition/metadatum-edition-form.vue index 67309cd79..2f356c16d 100644 --- a/src/views/admin/components/edition/metadatum-edition-form.vue +++ b/src/views/admin/components/edition/metadatum-edition-form.vue @@ -194,7 +194,7 @@ @@ -205,6 +205,7 @@ :message="$i18n.getHelperMessage('metadata', 'cardinality')"/> diff --git a/src/views/admin/components/metadata-types/relationship/Relationship.vue b/src/views/admin/components/metadata-types/relationship/Relationship.vue index dcee2c1f6..803452da3 100644 --- a/src/views/admin/components/metadata-types/relationship/Relationship.vue +++ b/src/views/admin/components/metadata-types/relationship/Relationship.vue @@ -10,7 +10,7 @@ @input="onInput" @blur="onBlur" :data="options" - :maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? null : 1)" + :maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : 1)" autocomplete :remove-on-keys="[]" :dropdown-position="isLastMetadatum ? 'top' :'auto'" @@ -52,7 +52,7 @@ @@ -105,7 +105,10 @@ computed: { collection() { return this.getCollection(); - } + }, + maxMultipleValues() { + return (this.itemMetadatum && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.cardinality && !isNaN(this.itemMetadatum.metadatum.cardinality)) ? this.itemMetadatum.metadatum.cardinality : undefined; + }, }, watch: { createNewItemModal() { diff --git a/src/views/admin/components/metadata-types/tainacan-form-item.vue b/src/views/admin/components/metadata-types/tainacan-form-item.vue index 35f609771..82f18fd4c 100644 --- a/src/views/admin/components/metadata-types/tainacan-form-item.vue +++ b/src/views/admin/components/metadata-types/tainacan-form-item.vue @@ -83,7 +83,7 @@ -