diff --git a/components/lib/panelmenu/PanelMenu.d.ts b/components/lib/panelmenu/PanelMenu.d.ts index 0ca71306a0..00629c012b 100755 --- a/components/lib/panelmenu/PanelMenu.d.ts +++ b/components/lib/panelmenu/PanelMenu.d.ts @@ -134,6 +134,10 @@ export interface PanelMenuState { * Defines current options in PanelMenu component. */ export interface PanelMenuContext { + /** + * Index of the menuitem. + */ + index: number; /** * Current active state of menuitem as a boolean. * @defaultValue false diff --git a/components/lib/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue index ca14f67a31..53dfbc76d7 100644 --- a/components/lib/panelmenu/PanelMenu.vue +++ b/components/lib/panelmenu/PanelMenu.vue @@ -13,26 +13,26 @@ :aria-disabled="isItemDisabled(item)" @click="onHeaderClick($event, item)" @keydown="onHeaderKeyDown($event, item)" - v-bind="getPTOptions(item, 'header')" + v-bind="getPTOptions('header', item, index)" :data-p-highlight="isItemActive(item)" :data-p-disabled="isItemDisabled(item)" > -