Skip to content

Commit d1e9267

Browse files
authored
Merge pull request #49271 from nextcloud/fix/files/reactivity-inject
fix(files): Make injected actions reactive
2 parents 8fd7210 + 221e72a commit d1e9267

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)