Skip to content

Commit

Permalink
WEBUI-1224: expose value-key on nuxeo-document-attachments.
Browse files Browse the repository at this point in the history
  • Loading branch information
poonamyadav252 committed Jul 26, 2023
1 parent 3adebdc commit cbf907c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Polymer({
<nuxeo-dropzone
value="{{_attachments}}"
multiple
value-key="file"
value-key="[[_getFileValue()]]"
uploaded-message="[[i18n('documentAttachments.upload.uploaded')]]"
message="[[i18n('documentAttachments.upload.add')]]"
drag-content-message="[[i18n('documentAttachments.upload.drop')]]"
Expand Down Expand Up @@ -164,4 +164,9 @@ Polymer({
_isAvailable(document, xpath) {
return document && xpath && this.hasSchema(document, xpath.split(':')[0]);
},

_getFileValue(){
const fileName = this.document.type == "File" && this.xpath=="files:files" ? "file":"";

Check failure on line 169 in elements/nuxeo-document-attachments/nuxeo-document-attachments.js

View workflow job for this annotation

GitHub Actions / lint

Expected '===' and instead saw '=='

Check failure on line 169 in elements/nuxeo-document-attachments/nuxeo-document-attachments.js

View workflow job for this annotation

GitHub Actions / lint

Expected '===' and instead saw '=='
return fileName;
},
});

0 comments on commit cbf907c

Please sign in to comment.