diff options
Diffstat (limited to 'apps/files/src/components/FileEntry/FileEntryActions.vue')
-rw-r--r-- | apps/files/src/components/FileEntry/FileEntryActions.vue | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/apps/files/src/components/FileEntry/FileEntryActions.vue b/apps/files/src/components/FileEntry/FileEntryActions.vue index a183d1b0618..9916e420e1b 100644 --- a/apps/files/src/components/FileEntry/FileEntryActions.vue +++ b/apps/files/src/components/FileEntry/FileEntryActions.vue @@ -22,8 +22,9 @@ type="tertiary" :force-menu="enabledInlineActions.length === 0 /* forceMenu only if no inline actions */" :inline="enabledInlineActions.length" - :open.sync="openedMenu" - @close="openedSubmenu = null"> + :open="openedMenu" + @close="onMenuClose" + @closed="onMenuClosed"> <!-- Default actions list--> <NcActionButton v-for="action, index in enabledMenuActions" :key="action.id" @@ -230,7 +231,7 @@ export default defineComponent({ }, watch: { - // Close any submenu when the menu is closed + // Close any submenu when the menu state changes openedMenu() { this.openedSubmenu = null }, @@ -302,6 +303,20 @@ export default defineComponent({ this.openedMenu = true } }, + + onMenuClose() { + // We reset the submenu state when the menu is closing + this.openedSubmenu = null + }, + + onMenuClosed() { + // TODO: remove timeout once https://github.com/nextcloud-libraries/nextcloud-vue/pull/6683 is merged + // and updated on server. + setTimeout(() => { + // We reset the actions menu state when the menu is finally closed + this.openedMenu = false + }, 100) + }, }, }) </script> |