Skip to content

Commit

Permalink
fix(files): Make injected actions reactive
Browse files Browse the repository at this point in the history
Provided values are not reactive by default and by design,
we must need computed to make them reactive.

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Nov 14, 2024
1 parent 3481ebf commit f09812e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/files/src/components/FileEntryMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { generateUrl } from '@nextcloud/router'
import { isPublicShare } from '@nextcloud/sharing/public'
import { vOnClickOutside } from '@vueuse/components'
import { extname } from 'path'
import Vue, { defineComponent } from 'vue'
import Vue, { computed, defineComponent } from 'vue'

import { action as sidebarAction } from '../actions/sidebarAction.ts'
import { getDragAndDropPreview } from '../utils/dragUtils.ts'
Expand Down Expand Up @@ -52,8 +52,8 @@ export default defineComponent({

provide() {
return {
defaultFileAction: this.defaultFileAction,
enabledFileActions: this.enabledFileActions,
defaultFileAction: computed(() => this.defaultFileAction),
enabledFileActions: computed(() => this.enabledFileActions),
}
},

Expand Down

0 comments on commit f09812e

Please sign in to comment.