diff --git a/components/lib/contextmenu/ContextMenu.d.ts b/components/lib/contextmenu/ContextMenu.d.ts index c262e1347..e23c66909 100755 --- a/components/lib/contextmenu/ContextMenu.d.ts +++ b/components/lib/contextmenu/ContextMenu.d.ts @@ -20,6 +20,7 @@ export declare type ContextMenuPassThroughOptionType = ContextMenuPassThroughAtt export interface ContextMenuPassThroughMethodOptions { props: ContextMenuProps; state: ContextMenuState; + options: ContextMenuOptions; } /** @@ -125,6 +126,22 @@ export interface ContextMenuState { submenuVisible: boolean; } +/** + * Defines current options in ContextMenu component. + */ +export interface ContextMenuOptions { + /** + * Current active state of menuitem as a boolean. + * @defaultValue false + */ + active: boolean; + /** + * Current focused state of menuitem as a boolean. + * @defaultValue false + */ + focused: boolean; +} + /** * Defines valid properties in ContextMenu component. */ diff --git a/components/lib/contextmenu/ContextMenuSub.vue b/components/lib/contextmenu/ContextMenuSub.vue index f1963f7ca..d4aab6021 100755 --- a/components/lib/contextmenu/ContextMenuSub.vue +++ b/components/lib/contextmenu/ContextMenuSub.vue @@ -15,24 +15,41 @@ :aria-level="level + 1" :aria-setsize="getAriaSetSize()" :aria-posinset="getAriaPosInset(index)" - v-bind="ptm('menuitem')" + v-bind="getPTOptions(processedItem, 'menuitem')" > -