@@ -72,7 +72,7 @@ import FilePickerNavigation from './FilePickerNavigation.vue'
72
72
73
73
import { emit as emitOnEventBus } from '@nextcloud/event-bus'
74
74
import { NcDialog, NcEmptyContent } from '@nextcloud/vue'
75
- import { computed, onMounted, ref, shallowReactive , toRef, watch } from 'vue'
75
+ import { computed, onMounted, ref, shallowRef , toRef, watch } from 'vue'
76
76
import { showError } from '../../toast'
77
77
import { useDAVFiles } from '../../composables/dav'
78
78
import { useMimeFilter } from '../../composables/mime'
@@ -147,7 +147,7 @@ const isOpen = ref(true)
147
147
* Map buttons to Dialog buttons by wrapping the callback function to pass the selected files
148
148
*/
149
149
const dialogButtons = computed(() => {
150
- const nodes = selectedFiles.length === 0 && props.allowPickDirectory && currentFolder.value ? [currentFolder.value] : selectedFiles
150
+ const nodes = selectedFiles.value. length === 0 && props.allowPickDirectory && currentFolder.value ? [currentFolder.value] : selectedFiles.value
151
151
const buttons = typeof props.buttons === 'function'
152
152
? props.buttons(nodes, currentPath.value, currentView.value)
153
153
: props.buttons
@@ -188,7 +188,7 @@ const viewHeadline = computed(() => currentView.value === 'favorites' ? t('Favor
188
188
/**
189
189
* All currently selected files
190
190
*/
191
- const selectedFiles = shallowReactive <Node[]>([])
191
+ const selectedFiles = shallowRef <Node[]>([])
192
192
193
193
/**
194
194
* Last path navigated to using the file picker
@@ -205,7 +205,7 @@ watch([navigatedPath], () => {
205
205
if (props.path === undefined && navigatedPath.value) {
206
206
window.sessionStorage.setItem('NC.FilePicker.LastPath', navigatedPath.value)
207
207
// Reset selected files
208
- selectedFiles.splice(0, selectedFiles.length)
208
+ selectedFiles.value = []
209
209
}
210
210
})
211
211
0 commit comments