Skip to content

Commit

Permalink
Refactor #4231 - For ContextMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Aug 2, 2023
1 parent 4e5038c commit b371f0e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/lib/contextmenu/ContextMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export interface ContextMenuPassThroughOptions {
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: any;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion components/lib/contextmenu/ContextMenu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Portal :appendTo="appendTo">
<transition name="p-contextmenu" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave">
<transition name="p-contextmenu" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
<div v-if="visible" :ref="containerRef" :class="cx('root')" v-bind="{ ...$attrs, ...ptm('root') }" data-pc-name="contextmenu">
<ContextMenuSub
:ref="listRef"
Expand Down
2 changes: 1 addition & 1 deletion components/lib/contextmenu/ContextMenuSub.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<transition name="p-contextmenusub" @enter="onEnter">
<transition name="p-contextmenusub" @enter="onEnter" v-bind="ptm('menu.transition')">
<ul v-if="root ? true : visible" ref="container" :tabindex="tabindex" v-bind="ptm('menu')">
<template v-for="(processedItem, index) of items" :key="getItemKey(processedItem)">
<li
Expand Down

0 comments on commit b371f0e

Please sign in to comment.