Fixed #3434 - PanelMenu: open/close events flipped
parent
a06547baec
commit
61508e656c
|
@ -199,11 +199,10 @@ export default {
|
||||||
},
|
},
|
||||||
changeActiveItem(event, item, selfActive = false) {
|
changeActiveItem(event, item, selfActive = false) {
|
||||||
if (!this.isItemDisabled(item)) {
|
if (!this.isItemDisabled(item)) {
|
||||||
this.activeItem = selfActive ? item : this.activeItem && this.activeItem === item ? null : item;
|
|
||||||
|
|
||||||
const active = this.isItemActive(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.changeExpandedKeys({ item, expanded: !active });
|
||||||
this.$emit(eventName, { originalEvent: event, item });
|
this.$emit(eventName, { originalEvent: event, item });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue