From d924dbac8dcd13423691fa82de58d431d2e28fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 25 Aug 2021 14:46:46 +0300 Subject: [PATCH] Fixed #1428 - [feature request]Please add event while menu/overlay is dismissed --- src/components/menu/Menu.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/menu/Menu.vue b/src/components/menu/Menu.vue index d77fdb3a0..aa05b1fec 100755 --- a/src/components/menu/Menu.vue +++ b/src/components/menu/Menu.vue @@ -29,6 +29,7 @@ import Menuitem from './Menuitem.vue'; export default { name: 'Menu', + emits: ['show', 'hide'], inheritAttrs: false, props: { popup: { @@ -117,11 +118,14 @@ export default { if (this.autoZIndex) { ZIndexUtils.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu); } + + this.$emit('show'); }, onLeave() { this.unbindOutsideClickListener(); this.unbindResizeListener(); this.unbindScrollListener(); + this.$emit('hide'); }, onAfterLeave(el) { if (this.autoZIndex) {