Skip to content
Snippets Groups Projects
Unverified Commit c7f9c791 authored by Christoph Wurst's avatar Christoph Wurst Committed by GitHub
Browse files

Merge pull request #1251 from nextcloud/feature/vue-remove-composer-attachment

Make it possible to remove composer attachments
parents 4822cf8b d5f2d1ec
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,8 @@
<div class="new-message-attachment-name">
{{attachment.displayName}}
</div>
<div class="new-message-attachments-action svg icon-delete"></div>
<div class="new-message-attachments-action svg icon-delete"
v-on:click="onDelete(attachment)"></div>
</li>
</ul>
<button class="button"
......@@ -75,7 +76,6 @@
}
},
emitNewAttachment (attachment) {
console.log('emit', attachment)
this.$emit('input', this.value.concat([attachment]))
},
onLocalAttachmentSelected (e) {
......@@ -98,6 +98,9 @@
this.fileNameToAttachment(path)
))
.catch(console.error.bind(this))
},
onDelete (attachment) {
this.$emit('input', this.value.filter(a => a !== attachment))
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment