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

feat(NcActions): Emit closed event only when the actions are fully closed #6065

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
}
},

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 @@ -1510,7 +1520,7 @@
return this.$refs.menu.querySelector('li.active')
},
/**
* @return {NodeListOf<HTMLElement>}

Check warning on line 1523 in src/components/NcActions/NcActions.vue

View workflow job for this annotation

GitHub Actions / NPM lint

The type 'NodeListOf' is undefined
*/
getFocusableMenuItemElements() {
return this.$refs.menu.querySelectorAll(focusableSelector)
Expand Down Expand Up @@ -1922,6 +1932,7 @@
show: this.openMenu,
'apply-show': this.onOpen,
hide: this.closeMenu,
'apply-hide': this.onClosed,
},
},
[
Expand Down
Loading