]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): Make injected actions reactive
authorFerdinand Thiessen <opensource@fthiessen.de>
Thu, 14 Nov 2024 00:01:38 +0000 (01:01 +0100)
committerFerdinand Thiessen <opensource@fthiessen.de>
Fri, 15 Nov 2024 11:17:00 +0000 (12:17 +0100)
Provided values are not reactive by default and by design,
we must need computed to make them reactive.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files/src/components/FileEntryMixin.ts

index e5d6a27e96c42c516c9fee1cd3fad7a0126aec5b..4a4e4f497b5eceb76db48ed4694bb444899e177a 100644 (file)
@@ -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'
@@ -52,8 +52,8 @@ export default defineComponent({
 
        provide() {
                return {
-                       defaultFileAction: this.defaultFileAction,
-                       enabledFileActions: this.enabledFileActions,
+                       defaultFileAction: computed(() => this.defaultFileAction),
+                       enabledFileActions: computed(() => this.enabledFileActions),
                }
        },