Skip to content

Commit b1df25a

Browse files
committed
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 <[email protected]>
1 parent 8fd7210 commit b1df25a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/files/src/components/FileEntryMixin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { generateUrl } from '@nextcloud/router'
1313
import { isPublicShare } from '@nextcloud/sharing/public'
1414
import { vOnClickOutside } from '@vueuse/components'
1515
import { extname } from 'path'
16-
import Vue, { defineComponent } from 'vue'
16+
import Vue, { computed, defineComponent } from 'vue'
1717

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

5353
provide() {
5454
return {
55-
defaultFileAction: this.defaultFileAction,
56-
enabledFileActions: this.enabledFileActions,
55+
defaultFileAction: computed(() => this.defaultFileAction),
56+
enabledFileActions: computed(() => this.enabledFileActions),
5757
}
5858
},
5959

0 commit comments

Comments
 (0)