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 <opensource@fthiessen.de>
pull/49271/head
Ferdinand Thiessen 2024-11-14 01:01:38 +07:00
parent 8fd7210aaa
commit b1df25af63
1 changed files with 3 additions and 3 deletions

@ -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),
}
},