aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-12-21 09:10:53 +0100
committerGitHub <noreply@github.com>2022-12-21 09:10:53 +0100
commitf562fc716ab8241abef4b53b1f1c3826c43fdd05 (patch)
tree9c6a2d4a3f9987107ddfc1264e155305f3078d0c /apps
parent78d8723d0cc8c726cc02dd41439f1c7e2a50136d (diff)
parent787262be4f840542c01a41a3b797144210427551 (diff)
downloadnextcloud-server-f562fc716ab8241abef4b53b1f1c3826c43fdd05.tar.gz
nextcloud-server-f562fc716ab8241abef4b53b1f1c3826c43fdd05.zip
Merge pull request #35836 from nextcloud/fix/remove-other-share-when-deleted
fix: remove other shares from ui when deleted
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/src/views/SharingInherited.vue13
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>