diff --git a/src/components/panelmenu/PanelMenu.vue b/src/components/panelmenu/PanelMenu.vue index e1995d7e9..c460d1518 100755 --- a/src/components/panelmenu/PanelMenu.vue +++ b/src/components/panelmenu/PanelMenu.vue @@ -57,6 +57,10 @@ export default { }, methods: { onItemClick(event, item, navigate) { + if (this.isActive(item) && this.activeItem === null) { + this.activeItem = item; + } + if (item.disabled) { event.preventDefault(); return; @@ -97,7 +101,7 @@ export default { return ['p-panelmenu-panel', item.class]; }, getPanelToggleIcon(item) { - const active = item === this.activeItem; + const active = this.isActive(item) && this.activeItem === null ? true : item === this.activeItem; return ['p-panelmenu-icon pi', {'pi-chevron-right': !active,' pi-chevron-down': active}]; }, getPanelIcon(item) { diff --git a/src/components/panelmenu/PanelMenuSub.vue b/src/components/panelmenu/PanelMenuSub.vue index 069ea6fab..b2c74c14e 100755 --- a/src/components/panelmenu/PanelMenuSub.vue +++ b/src/components/panelmenu/PanelMenuSub.vue @@ -54,6 +54,10 @@ export default { }, methods: { onItemClick(event, item, navigate) { + if (this.isActive(item) && this.activeItem === null) { + this.activeItem = item; + } + if (item.disabled) { event.preventDefault(); return;