From 6d2f17501e99ce1ec6b14894fde425ff1023c119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 25 Jul 2023 12:11:01 +0300 Subject: [PATCH] Refactor #4190 - For Dock --- components/lib/dock/Dock.d.ts | 4 ++++ components/lib/dock/DockSub.vue | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/lib/dock/Dock.d.ts b/components/lib/dock/Dock.d.ts index 289da96f8..ee0d7702c 100644 --- a/components/lib/dock/Dock.d.ts +++ b/components/lib/dock/Dock.d.ts @@ -104,6 +104,10 @@ export interface DockContext { * Current index of the menuitem. */ index: number; + /** + * Current menuitem + */ + item: any; /** * 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 96a9739ba..989264a51 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('menuitem', index)" + v-bind="getPTOptions('menuitem', processedItem, index)" :data-p-focused="isItemActive(getItemId(index))" :data-p-disabled="disabled(processedItem) || false" > -
+