mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Refactor #3907 - options have changed as context
This commit is contained in:
parent
6005b67be7
commit
5aab120fe5
16 changed files with 75 additions and 24 deletions
4
components/lib/contextmenu/ContextMenu.d.ts
vendored
4
components/lib/contextmenu/ContextMenu.d.ts
vendored
|
@ -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
|
||||
|
|
|
@ -149,7 +149,7 @@ export default {
|
|||
},
|
||||
getPTOptions(processedItem, key) {
|
||||
return this.ptm(key, {
|
||||
options: {
|
||||
context: {
|
||||
active: this.isItemActive(processedItem),
|
||||
focused: this.isItemFocused(processedItem)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue