Skip to content

Commit

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

/**
Expand Down
2 changes: 1 addition & 1 deletion components/lib/panelmenu/PanelMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<component v-else :is="$slots.item" :item="item"></component>
</div>
</div>
<transition name="p-toggleable-content">
<transition name="p-toggleable-content" v-bind="ptm('transition')">
<div v-show="isItemActive(item)" :id="getContentId(index)" :class="cx('toggleableContent')" role="region" :aria-labelledby="getHeaderId(index)" v-bind="ptm('toggleableContent')">
<div v-if="getItemProp(item, 'items')" :class="cx('menuContent')" v-bind="ptm('menuContent')">
<PanelMenuList
Expand Down
2 changes: 1 addition & 1 deletion components/lib/panelmenu/PanelMenuSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</template>
<component v-else :is="templates.item" :item="processedItem.item"></component>
</div>
<transition name="p-toggleable-content">
<transition name="p-toggleable-content" v-bind="ptm('transition')">
<div v-show="isItemActive(processedItem)" :class="cx('toggleableContent')" v-bind="ptm('toggleableContent')">
<PanelMenuSub
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
Expand Down

0 comments on commit f3aed1a

Please sign in to comment.