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 @@ ...@@ -26,7 +26,8 @@
<div class="new-message-attachment-name"> <div class="new-message-attachment-name">
{{attachment.displayName}} {{attachment.displayName}}
</div> </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> </li>
</ul> </ul>
<button class="button" <button class="button"
...@@ -75,7 +76,6 @@ ...@@ -75,7 +76,6 @@
} }
}, },
emitNewAttachment (attachment) { emitNewAttachment (attachment) {
console.log('emit', attachment)
this.$emit('input', this.value.concat([attachment])) this.$emit('input', this.value.concat([attachment]))
}, },
onLocalAttachmentSelected (e) { onLocalAttachmentSelected (e) {
...@@ -98,6 +98,9 @@ ...@@ -98,6 +98,9 @@
this.fileNameToAttachment(path) this.fileNameToAttachment(path)
)) ))
.catch(console.error.bind(this)) .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