Fixed #3434 - PanelMenu: open/close events flipped

pull/3509/head
mertsincan 2023-01-09 12:47:52 +00:00
parent a06547baec
commit 61508e656c
1 changed files with 2 additions and 3 deletions

View File

@ -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 });
}