diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-01-02 17:18:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 17:18:35 +0100 |
commit | 6aae233f56d5a072fc961cddb1bfb95d148c821a (patch) | |
tree | 4dc845a09f36a2aebfe7cd13740464c6ed86aa7c /apps/files_sharing | |
parent | 6881d200ad72a881dc4449ca38153f85d966195f (diff) | |
parent | be2121c64ba99d350bf5f37bebe5d9134d323b94 (diff) | |
download | nextcloud-server-6aae233f56d5a072fc961cddb1bfb95d148c821a.tar.gz nextcloud-server-6aae233f56d5a072fc961cddb1bfb95d148c821a.zip |
Merge pull request #35849 from nextcloud/backport/35836/stable24
[stable24] fix: remove other shares from ui when deleted
Diffstat (limited to 'apps/files_sharing')
-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 3a3e4b633e2..2138e801675 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -38,7 +38,8 @@ <SharingEntryInherited v-for="share in shares" :key="share.id" :file-info="fileInfo" - :share="share" /> + :share="share" + @remove:share="removeShare" /> </ul> </template> @@ -149,6 +150,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> |