Skip to content

Commit 24d378d

Browse files
authored
Merge pull request #35848 from nextcloud/backport/35836/stable25
[stable25] fix: remove other shares from ui when deleted
2 parents 1dc9650 + 2e53ca4 commit 24d378d

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
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>

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)