Adds number of selected values info to new taxonomy checkbox input

This commit is contained in:
mateuswetah 2020-10-30 15:40:02 -03:00
parent 246723fc60
commit dabf0d78f3
3 changed files with 4 additions and 1218 deletions

View File

@ -24,6 +24,7 @@
:collection-id="itemMetadatum.metadatum.collection_id"
:is-taxonomy="true"
:metadatum="itemMetadatum.metadatum"
:amount-selected="getComponent == 'tainacan-taxonomy-checkbox' ? value.length : (value ? '1' : '0')"
:is-checkbox="getComponent == 'tainacan-taxonomy-checkbox'"
@input="(selected) => valueComponent = selected"
/>

File diff suppressed because it is too large Load Diff

View File

@ -227,7 +227,7 @@
</b-tab-item>
<b-tab-item :label="isTaxonomy ? $i18n.get('label_selected_terms') : $i18n.get('label_selected_metadatum_values')">
<b-tab-item :label="(isTaxonomy ? $i18n.get('label_selected_terms') : $i18n.get('label_selected_metadatum_values')) + (amountSelected !== null && amountSelected !== undefined ? (' (' + amountSelected + ')' ): '') ">
<div class="modal-card-body tainacan-tags-container">
<b-field
@ -303,7 +303,8 @@
isCheckbox: {
type: Boolean,
default: true,
}
},
amountSelected: 0
},
data() {
return {