Skip to content

Commit

Permalink
fix(FilePicker): Listen on update:open rather than closed event f…
Browse files Browse the repository at this point in the history
…rom `NcDialog`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Nov 17, 2023
1 parent 46041f5 commit 66a786b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 11 additions & 1 deletion lib/components/FilePicker/FilePicker.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcDialog v-bind="dialogProps" @close="emit('close')">
<NcDialog v-bind="dialogProps" @update:open="handleClose">
<template #navigation="{ isCollapsed }">
<FilePickerNavigation :is-collapsed="isCollapsed" :current-view.sync="currentView" :filter-string.sync="filterString" />
</template>
Expand Down Expand Up @@ -266,6 +266,16 @@ const onCreateFolder = async (name: string) => {
showError(t('Could not create the new folder'))
}
}
/**
* Handle closing the file picker
* @param open If the dialog is open
*/
const handleClose = (open: boolean) => {
if (!open) {
emit('close')
}
}
</script>

<script lang="ts">
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dist"
],
"peerDependencies": {
"@nextcloud/vue": "^8.0.0",
"@nextcloud/vue": "^8.1.0",
"vue": "^2.7.15"
},
"dependencies": {
Expand Down

0 comments on commit 66a786b

Please sign in to comment.