Skip to content

Commit

Permalink
Fixed #4632 - Menu components pt context disabled updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 17, 2023
1 parent e8acbef commit 1953c34
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 5 deletions.
5 changes: 5 additions & 0 deletions components/lib/contextmenu/ContextMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ export interface ContextMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}

/**
Expand Down
1 change: 1 addition & 0 deletions components/lib/contextmenu/ContextMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export default {
item: processedItem,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem),
index
}
});
Expand Down
5 changes: 5 additions & 0 deletions components/lib/megamenu/MegaMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ export interface MegaMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion components/lib/megamenu/MegaMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
});
},
Expand Down
5 changes: 5 additions & 0 deletions components/lib/menu/Menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ export interface MenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion components/lib/menu/Menuitem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export default {
context: {
item: this.item,
index: this.index,
focused: this.isItemFocused()
focused: this.isItemFocused(),
disabled: this.isItemDisabled(processedItem)
}
});
},
Expand Down
5 changes: 5 additions & 0 deletions components/lib/menubar/Menubar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions components/lib/menubar/MenubarSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default {
index,
active: this.isItemActive(processedItem),
focused: this.isItemFocused(processedItem),
disabled: this.isItemDisabled(processedItem),
level: this.level
}
});
Expand Down
5 changes: 5 additions & 0 deletions components/lib/panelmenu/PanelMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ export interface PanelMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion components/lib/panelmenu/PanelMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export default {
context: {
index,
active: this.isItemActive(item),
focused: this.isItemFocused(item)
focused: this.isItemFocused(item),
disabled: this.isItemDisabled(processedItem)
}
});
},
Expand Down
3 changes: 2 additions & 1 deletion components/lib/panelmenu/PanelMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
});
},
Expand Down
5 changes: 5 additions & 0 deletions components/lib/tieredmenu/TieredMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export interface TieredMenuContext {
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state of menuitem as a boolean.
* @defaultValue false
*/
disabled: boolean;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion components/lib/tieredmenu/TieredMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
});
},
Expand Down

0 comments on commit 1953c34

Please sign in to comment.