From 608e222d609e8adba8db772d766cb52157745ddc 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: Wed, 19 Jul 2023 15:03:52 +0300 Subject: [PATCH] Refactor #4149 - For Dock --- components/lib/dock/Dock.d.ts | 4 ++++ components/lib/dock/DockSub.vue | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) 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" > -
+