Fixed #1428 - [feature request]Please add event while menu/overlay is dismissed

pull/1478/head
Tuğçe Küçükoğlu 2021-08-25 14:46:46 +03:00
parent eef5c7a80d
commit d924dbac8d
1 changed files with 4 additions and 0 deletions

View File

@ -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) {