Skip to content

Commit

Permalink
Fixed #3357 - TabMenu: we can not use tab-change event with menuitem …
Browse files Browse the repository at this point in the history
…templating
  • Loading branch information
tugcekucukoglu committed Dec 2, 2022
1 parent 05aaf04 commit c983571
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/components/tabmenu/TabMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,9 @@
<component v-else :is="$slots.item" :item="item"></component>
</li>
</router-link>
<li v-else-if="visible(item)" ref="tab" :class="getItemClass(item, i)" role="presentation">
<li v-else-if="visible(item)" ref="tab" :class="getItemClass(item, i)" role="presentation" @click="onItemClick($event, item, i)" @keydown="onKeydownItem($event, item, i)">
<template v-if="!$slots.item">
<a
ref="tabLink"
v-ripple
role="menuitem"
:href="item.url"
class="p-menuitem-link"
:target="item.target"
:aria-label="label(item)"
:aria-disabled="disabled(item)"
:tabindex="setTabIndex(i)"
@click="onItemClick($event, item, i)"
@keydown="onKeydownItem($event, item, i)"
>
<a ref="tabLink" v-ripple role="menuitem" :href="item.url" class="p-menuitem-link" :target="item.target" :aria-label="label(item)" :aria-disabled="disabled(item)" :tabindex="setTabIndex(i)">
<span v-if="item.icon" :class="getItemIcon(item)"></span>
<span class="p-menuitem-text">{{ label(item) }}</span>
</a>
Expand Down

0 comments on commit c983571

Please sign in to comment.