Skip to content

Commit

Permalink
fix(files_sharing): Update QuickShareSelect if share is modified
Browse files Browse the repository at this point in the history
Signed-off-by: nfebe <fenn25.fn@gmail.com>
  • Loading branch information
nfebe committed Feb 5, 2025
1 parent 91d1447 commit 522030c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

<script>
import { ShareType } from '@nextcloud/sharing'
import { subscribe } from '@nextcloud/event-bus'
import DropdownIcon from 'vue-material-design-icons/TriangleSmallDown.vue'
import SharesMixin from '../mixins/SharesMixin.js'
import ShareDetails from '../mixins/ShareDetails.js'
Expand Down Expand Up @@ -145,7 +146,14 @@ export default {
created() {
this.selectedOption = this.preSelectedOption
},

mounted() {
subscribe('update:share', (share) => {
if (share.id === this.share.id) {
this.share.permissions = share.permissions
this.selectedOption = this.preSelectedOption
}
})
},
methods: {
selectOption(optionLabel) {
this.selectedOption = optionLabel
Expand Down
1 change: 1 addition & 0 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ export default {
this.$emit('add:share', this.share)
} else {
this.$emit('update:share', this.share)
emit('update:share', this.share)
this.queueUpdate(...permissionsAndAttributes)
}

Expand Down

0 comments on commit 522030c

Please sign in to comment.