Fixes wrong update of valuesAsHtml content inside realtionship input

This commit is contained in:
mateuswetah 2021-08-20 11:32:11 -03:00
parent 8ffd6f5c63
commit f4d1152bf9
2 changed files with 3 additions and 5 deletions

View File

@ -205,7 +205,6 @@
this.metadata = []; this.metadata = [];
for (let metadatum of metadata) { for (let metadatum of metadata) {
console.log(me)
if (metadatum.metadata_type_object.component !== 'tainacan-relationship' && metadatum.metadata_type_object.component !== 'tainacan-compound') { if (metadatum.metadata_type_object.component !== 'tainacan-relationship' && metadatum.metadata_type_object.component !== 'tainacan-compound') {
this.metadata.push( metadatum ); this.metadata.push( metadatum );
this.hasMetadata = true; this.hasMetadata = true;

View File

@ -381,7 +381,6 @@
// An item is being edited from the modal // An item is being edited from the modal
if (this.editingItemId) { if (this.editingItemId) {
if (data.item && data.item.id) { if (data.item && data.item.id) {
const existingItemIndex = this.selected.findIndex(anItemValue => anItemValue.value == data.item.id); const existingItemIndex = this.selected.findIndex(anItemValue => anItemValue.value == data.item.id);
@ -389,7 +388,7 @@
this.selected.splice(existingItemIndex, 1, { this.selected.splice(existingItemIndex, 1, {
label: this.getItemLabel(data.item), label: this.getItemLabel(data.item),
value: data.item.id, value: data.item.id,
valueAsHtml: this.getItemMetadataValuesAsHtml(data.item), valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item),
img: data.item.thumbnail ? data.item.thumbnail : '' img: data.item.thumbnail ? data.item.thumbnail : ''
}); });
} }
@ -406,7 +405,7 @@
this.selected.push({ this.selected.push({
label: this.getItemLabel(data.item), label: this.getItemLabel(data.item),
value: data.item.id, value: data.item.id,
valueAsHtml: this.getItemMetadataValuesAsHtml(data.item), valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item),
img: data.item.thumbnail ? data.item.thumbnail : '' img: data.item.thumbnail ? data.item.thumbnail : ''
}); });
@ -546,7 +545,7 @@
img { img {
max-width: 28px; max-width: 28px;
max-height: 28px; max-height: 28px;
margin-right: 6px; margin-right: 10px;
} }
} }
.relationship-value-button--edit, .relationship-value-button--edit,