diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/views/SharingInherited.vue | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_sharing/src/views/SharingInherited.vue b/apps/files_sharing/src/views/SharingInherited.vue index 0f7d9d8b55b..f66fb44cfab 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -41,7 +41,8 @@ <SharingEntryInherited v-for="share in shares" :key="share.id" :file-info="fileInfo" - :share="share" /> + :share="share" + @remove:share="removeShare" /> </ul> </template> @@ -152,6 +153,16 @@ export default { this.showInheritedShares = false this.shares = [] }, + /** + * Remove a share from the shares list + * + * @param {Share} share the share to remove + */ + removeShare(share) { + const index = this.shares.findIndex(item => item === share) + // eslint-disable-next-line vue/no-mutating-props + this.shares.splice(index, 1) + }, }, } </script> |