Refactor #4190 - For PanelMenu

pull/4208/head
Tuğçe Küçükoğlu 2023-07-25 12:11:38 +03:00
parent 06acfdf264
commit a7f0366b6a
2 changed files with 5 additions and 0 deletions

View File

@ -134,6 +134,10 @@ export interface PanelMenuState {
* Defines current options in PanelMenu component. * Defines current options in PanelMenu component.
*/ */
export interface PanelMenuContext { export interface PanelMenuContext {
/**
* Current menuitem
*/
item: any;
/** /**
* Index of the menuitem. * Index of the menuitem.
*/ */

View File

@ -130,6 +130,7 @@ export default {
getPTOptions(key, processedItem, index) { getPTOptions(key, processedItem, index) {
return this.ptm(key, { return this.ptm(key, {
context: { context: {
item: processedItem,
index, index,
active: this.isItemActive(processedItem), active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem) focused: this.isItemFocused(processedItem)