diff --git a/components/lib/dock/Dock.d.ts b/components/lib/dock/Dock.d.ts index 8a0c73ae0..289da96f8 100644 --- a/components/lib/dock/Dock.d.ts +++ b/components/lib/dock/Dock.d.ts @@ -100,6 +100,10 @@ export interface DockState { * Defines current options in Dock component. */ export interface DockContext { + /** + * Current index of the menuitem. + */ + index: number; /** * Current active state of menuitem as a boolean. * @defaultValue false diff --git a/components/lib/dock/DockSub.vue b/components/lib/dock/DockSub.vue index 44151d62e..96a9739ba 100644 --- a/components/lib/dock/DockSub.vue +++ b/components/lib/dock/DockSub.vue @@ -25,11 +25,11 @@ :aria-disabled="disabled(processedItem)" @click="onItemClick($event, processedItem)" @mouseenter="onItemMouseEnter(index)" - v-bind="getPTOptions(getItemId(index), 'menuitem')" + v-bind="getPTOptions('menuitem', index)" :data-p-focused="isItemActive(getItemId(index))" :data-p-disabled="disabled(processedItem) || false" > -