Refactor #3907 - options have changed as context

This commit is contained in:
Tuğçe Küçükoğlu 2023-04-28 13:15:44 +03:00
parent 6005b67be7
commit 5aab120fe5
16 changed files with 75 additions and 24 deletions

View file

@ -20,7 +20,7 @@ export declare type ContextMenuPassThroughOptionType = ContextMenuPassThroughAtt
export interface ContextMenuPassThroughMethodOptions {
props: ContextMenuProps;
state: ContextMenuState;
options: ContextMenuOptions;
context: ContextMenuContext;
}
/**
@ -129,7 +129,7 @@ export interface ContextMenuState {
/**
* Defines current options in ContextMenu component.
*/
export interface ContextMenuOptions {
export interface ContextMenuContext {
/**
* Current active state of menuitem as a boolean.
* @defaultValue false

View file

@ -149,7 +149,7 @@ export default {
},
getPTOptions(processedItem, key) {
return this.ptm(key, {
options: {
context: {
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem)
}