File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2424</template >
2525
2626<script >
27+ import { subscribe , unsubscribe } from ' @nextcloud/event-bus'
2728import DropdownIcon from ' vue-material-design-icons/TriangleSmallDown.vue'
2829import SharesMixin from ' ../mixins/SharesMixin.js'
2930import ShareDetails from ' ../mixins/ShareDetails.js'
@@ -141,7 +142,17 @@ export default {
141142 created () {
142143 this .selectedOption = this .preSelectedOption
143144 },
144-
145+ mounted () {
146+ subscribe (' update:share' , (share ) => {
147+ if (share .id === this .share .id ) {
148+ this .share .permissions = share .permissions
149+ this .selectedOption = this .preSelectedOption
150+ }
151+ })
152+ },
153+ unmounted () {
154+ unsubscribe (' update:share' )
155+ },
145156 methods: {
146157 selectOption (optionLabel ) {
147158 this .selectedOption = optionLabel
Original file line number Diff line number Diff line change @@ -874,6 +874,7 @@ export default {
874874 this .$emit (' add:share' , this .share )
875875 } else {
876876 this .$emit (' update:share' , this .share )
877+ emit (' update:share' , this .share )
877878 this .queueUpdate (... permissionsAndAttributes)
878879 }
879880
You can’t perform that action at this time.
0 commit comments