Skip to content

Commit

Permalink
Fixed #4764 - ContextMenu: hasSubmenu options for item templating
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 7, 2023
1 parent 01af58f commit a59b595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/lib/contextmenu/ContextMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ export interface ContextMenuSlots {
* Label property of the menuitem
*/
label: string | ((...args: any) => string) | undefined;
/**
* Whether or not there is a submenu
*/
hasSubmenu: boolean;
/**
* Binding properties of the menuitem
*/
Expand Down
2 changes: 1 addition & 1 deletion components/lib/contextmenu/ContextMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</template>
</a>
</template>
<component v-else :is="templates.item" :item="processedItem.item" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
<component v-else :is="templates.item" :item="processedItem.item" :hasSubmenu="getItemProp(processedItem, 'items')" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
</div>
<ContextMenuSub
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
Expand Down

0 comments on commit a59b595

Please sign in to comment.