Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FilePicker): Listen on update:open rather than closed event from NcDialog #1113

Merged
merged 1 commit into from Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/components/FilePicker/FilePicker.vue
@@ -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
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