From f09812ec4cc8a635d9a20625b3651b78786dd83b Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 14 Nov 2024 01:01:38 +0100 Subject: [PATCH] fix(files): Make injected actions reactive Provided values are not reactive by default and by design, we must need computed to make them reactive. Signed-off-by: Ferdinand Thiessen --- apps/files/src/components/FileEntryMixin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index e5d6a27e96c42..4a4e4f497b5ec 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -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), } },