diff --git a/components/lib/panelmenu/PanelMenu.d.ts b/components/lib/panelmenu/PanelMenu.d.ts
index d713bafd1..ccd3967f5 100755
--- a/components/lib/panelmenu/PanelMenu.d.ts
+++ b/components/lib/panelmenu/PanelMenu.d.ts
@@ -228,6 +228,14 @@ export interface PanelMenuRouterBindProps {
* Submenuicon elemnt binding
*/
submenuicon: object;
+ /**
+ * Header icon element binding
+ */
+ headerIcon: object;
+ /**
+ * Header label element binding
+ */
+ headerLabel: object;
}
/**
diff --git a/components/lib/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue
index a7889a6a5..4ab53e720 100644
--- a/components/lib/panelmenu/PanelMenu.vue
+++ b/components/lib/panelmenu/PanelMenu.vue
@@ -35,7 +35,7 @@
{{ getItemLabel(item) }}
-
+
@@ -64,6 +64,7 @@
import ChevronDownIcon from 'primevue/icons/chevrondown';
import ChevronRightIcon from 'primevue/icons/chevronright';
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
+import { mergeProps } from 'vue';
import BasePanelMenu from './BasePanelMenu.vue';
import PanelMenuList from './PanelMenuList.vue';
@@ -248,6 +249,22 @@ export default {
},
changeFocusedHeader(event, element) {
element && DomHandler.focus(element);
+ },
+ getMenuItemProps(item, index) {
+ return {
+ icon: mergeProps(
+ {
+ class: [this.cx('headerIcon'), this.getItemProp(item, 'icon')]
+ },
+ this.getPTOptions('headerIcon', item, index)
+ ),
+ label: mergeProps(
+ {
+ class: this.cx('headerLabel')
+ },
+ this.getPTOptions('headerLabel', processedItem, index)
+ )
+ };
}
},
components: {