From 61508e656c4a66b74592132dc9420ad5b48b6b4c Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 9 Jan 2023 12:47:52 +0000 Subject: [PATCH] Fixed #3434 - PanelMenu: open/close events flipped --- components/panelmenu/PanelMenu.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/panelmenu/PanelMenu.vue b/components/panelmenu/PanelMenu.vue index 5d129b366..afe7bc036 100755 --- a/components/panelmenu/PanelMenu.vue +++ b/components/panelmenu/PanelMenu.vue @@ -199,11 +199,10 @@ export default { }, changeActiveItem(event, item, selfActive = false) { if (!this.isItemDisabled(item)) { - this.activeItem = selfActive ? item : this.activeItem && this.activeItem === item ? null : item; - const active = this.isItemActive(item); - const eventName = active ? 'panel-open' : 'panel-close'; + const eventName = !active ? 'panel-open' : 'panel-close'; + this.activeItem = selfActive ? item : this.activeItem && this.activeItem === item ? null : item; this.changeExpandedKeys({ item, expanded: !active }); this.$emit(eventName, { originalEvent: event, item }); }