diff --git a/components/lib/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue index 66342c3d9..0c62dc052 100644 --- a/components/lib/panelmenu/PanelMenu.vue +++ b/components/lib/panelmenu/PanelMenu.vue @@ -13,24 +13,24 @@ :aria-disabled="isItemDisabled(item)" @click="onHeaderClick($event, item)" @keydown="onHeaderKeyDown($event, item)" - v-bind="ptm('header')" + v-bind="getPTOptions(item, 'header')" > -
+
@@ -107,6 +107,14 @@ export default { getItemLabel(item) { return this.getItemProp(item, 'label'); }, + getPTOptions(item, key) { + return this.ptm(key, { + options: { + active: this.isItemActive(item), + focused: this.isItemFocused(item) + } + }); + }, isItemActive(item) { return this.expandedKeys ? this.expandedKeys[this.getItemProp(item, 'key')] : ObjectUtils.equals(item, this.activeItem); }, @@ -116,6 +124,9 @@ export default { isItemDisabled(item) { return this.getItemProp(item, 'disabled'); }, + isItemFocused(item) { + return ObjectUtils.equals(item, this.activeItem); + }, getPanelId(index) { return `${this.id}_${index}`; },