Skip to content

Commit e2018a1

Browse files
authored
Merge pull request #6065 from nextcloud-libraries/fix/nc-actions-closed
feat(NcActions): Emit `closed` event only when the actions are fully closed
2 parents 1afa82c + c729694 commit e2018a1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/components/NcActions/NcActions.vue

+12-1
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,8 @@ export default {
14491449
this.$emit('update:open', false)
14501450

14511451
/**
1452-
* Event emitted when the popover menu is closed
1452+
* Event emitted when the popover menu is *being* closed.
1453+
* @deprecated use `update:open` instead. This is always emitted the same time as `('update:open', false)`
14531454
*/
14541455
this.$emit('close')
14551456

@@ -1462,6 +1463,15 @@ export default {
14621463
}
14631464
},
14641465

1466+
onClosed() {
1467+
/**
1468+
* Event emitted when the popover menu is closed.
1469+
*
1470+
* This event is emitted after `update:open` was emitted and the closing transition finished.
1471+
*/
1472+
this.$emit('closed')
1473+
},
1474+
14651475
/**
14661476
* Called when popover is shown after the show delay
14671477
*/
@@ -1922,6 +1932,7 @@ export default {
19221932
show: this.openMenu,
19231933
'apply-show': this.onOpen,
19241934
hide: this.closeMenu,
1935+
'apply-hide': this.onClosed,
19251936
},
19261937
},
19271938
[

0 commit comments

Comments
 (0)