Skip to content

Commit

Permalink
Merge pull request #6065 from nextcloud-libraries/fix/nc-actions-closed
Browse files Browse the repository at this point in the history
feat(NcActions): Emit `closed` event only when the actions are fully closed
  • Loading branch information
susnux authored Sep 17, 2024
2 parents 1afa82c + c729694 commit e2018a1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,8 @@ export default {
this.$emit('update:open', false)
/**
* Event emitted when the popover menu is closed
* Event emitted when the popover menu is *being* closed.
* @deprecated use `update:open` instead. This is always emitted the same time as `('update:open', false)`
*/
this.$emit('close')
Expand All @@ -1462,6 +1463,15 @@ export default {
}
},
onClosed() {
/**
* Event emitted when the popover menu is closed.
*
* This event is emitted after `update:open` was emitted and the closing transition finished.
*/
this.$emit('closed')
},
/**
* Called when popover is shown after the show delay
*/
Expand Down Expand Up @@ -1922,6 +1932,7 @@ export default {
show: this.openMenu,
'apply-show': this.onOpen,
hide: this.closeMenu,
'apply-hide': this.onClosed,
},
},
[
Expand Down

0 comments on commit e2018a1

Please sign in to comment.