mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #4764 - ContextMenu: hasSubmenu options for item templating
This commit is contained in:
parent
01af58f917
commit
a59b595334
2 changed files with 5 additions and 1 deletions
4
components/lib/contextmenu/ContextMenu.d.ts
vendored
4
components/lib/contextmenu/ContextMenu.d.ts
vendored
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue