Skip to content

Commit 3c48c2a

Browse files
fix: remove other shares from ui when deleted
Remove the share entry in question when unsharing a folder from within the `others with access` section of a file within that folder. Using the code from the ShareList view here as well. Just copying the code here as this is a bugfix that will need to be backported. Signed-off-by: Max <max@nextcloud.com>
1 parent e76715a commit 3c48c2a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

apps/files_sharing/src/views/SharingInherited.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<SharingEntryInherited v-for="share in shares"
4242
:key="share.id"
4343
:file-info="fileInfo"
44-
:share="share" />
44+
:share="share"
45+
@remove:share="removeShare" />
4546
</ul>
4647
</template>
4748

@@ -152,6 +153,16 @@ export default {
152153
this.showInheritedShares = false
153154
this.shares = []
154155
},
156+
/**
157+
* Remove a share from the shares list
158+
*
159+
* @param {Share} share the share to remove
160+
*/
161+
removeShare(share) {
162+
const index = this.shares.findIndex(item => item === share)
163+
// eslint-disable-next-line vue/no-mutating-props
164+
this.shares.splice(index, 1)
165+
},
155166
},
156167
}
157168
</script>

0 commit comments

Comments
 (0)