Fixed #4632 - Menu components pt context disabled updates

pull/4649/head
Tuğçe Küçükoğlu 2023-10-17 13:06:59 +03:00
parent e8acbefd2a
commit 1953c34171
13 changed files with 42 additions and 5 deletions

View File

@ -182,6 +182,11 @@ export interface ContextMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/**

View File

@ -147,6 +147,7 @@ export default {
item: processedItem,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem),
index
}
});

View File

@ -189,6 +189,11 @@ export interface MegaMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/**

View File

@ -158,7 +158,8 @@ export default {
item: processedItem,
index,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem)
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem)
}
});
},

View File

@ -155,6 +155,11 @@ export interface MenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/**

View File

@ -60,7 +60,8 @@ export default {
context: {
item: this.item,
index: this.index,
focused: this.isItemFocused()
focused: this.isItemFocused(),
disabled: this.isItemDisabled(processedItem)
}
});
},

View File

@ -186,6 +186,11 @@ export interface MenubarContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
/**
* Current level of the menuitem.
*/

View File

@ -146,6 +146,7 @@ export default {
index,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem),
level: this.level
}
});

View File

@ -175,6 +175,11 @@ export interface PanelMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/**

View File

@ -103,7 +103,8 @@ export default {
context: {
index,
active: this.isItemActive(item),
focused: this.isItemFocused(item)
focused: this.isItemFocused(item),
disabled: this.isItemDisabled(processedItem)
}
});
},

View File

@ -135,7 +135,8 @@ export default {
item: processedItem,
index,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem)
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem)
}
});
},

View File

@ -176,6 +176,11 @@ export interface TieredMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}
/**

View File

@ -135,7 +135,8 @@ export default {
item: processedItem,
index,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem)
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem)
}
});
},