From 466597181abf14489b14e2f92fe268fc63df555f Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 8 Nov 2023 16:10:03 +0300 Subject: [PATCH] Fixed #4779 - PanelMenu: root option for item templating --- components/lib/panelmenu/PanelMenu.d.ts | 4 ++++ components/lib/panelmenu/PanelMenu.vue | 2 +- components/lib/panelmenu/PanelMenuSub.vue | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/panelmenu/PanelMenu.d.ts b/components/lib/panelmenu/PanelMenu.d.ts index c2d6eae61..2745d74fb 100755 --- a/components/lib/panelmenu/PanelMenu.d.ts +++ b/components/lib/panelmenu/PanelMenu.d.ts @@ -296,6 +296,10 @@ export interface PanelMenuSlots { * Menuitem instance */ item: MenuItem; + /** + * Whether there is a root menuitem + */ + root: boolean; /** * Current active state of the menuitem */ diff --git a/components/lib/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue index 1556b0475..f2a53ac8a 100644 --- a/components/lib/panelmenu/PanelMenu.vue +++ b/components/lib/panelmenu/PanelMenu.vue @@ -28,7 +28,7 @@ {{ getItemLabel(item) }} - + diff --git a/components/lib/panelmenu/PanelMenuSub.vue b/components/lib/panelmenu/PanelMenuSub.vue index bee85e543..52f94dc5b 100755 --- a/components/lib/panelmenu/PanelMenuSub.vue +++ b/components/lib/panelmenu/PanelMenuSub.vue @@ -32,6 +32,7 @@ v-else :is="templates.item" :item="processedItem.item" + :root="false" :isActive="isItemActive(processedItem)" :hasSubmenu="isItemGroup(processedItem)" :label="getItemLabel(processedItem)"