Skip to content

Commit

Permalink
Refactor #3889 - For SpeedDial
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Apr 27, 2023
1 parent 48b066b commit aef0282
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions components/lib/speeddial/SpeedDial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@
</slot>
<ul :ref="listRef" :id="id + '_list'" class="p-speeddial-list" role="menu" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" :aria-activedescendant="focused ? focusedOptionId : undefined" tabindex="-1" v-bind="ptm('menu')">
<template v-for="(item, index) of model" :key="index">
<li
v-if="isItemVisible(item)"
:id="`${id}_${index}`"
:aria-controls="`${id}_item`"
class="p-speeddial-item"
:class="itemClass(`${id}_${index}`)"
:style="getItemStyle(index)"
role="menuitem"
v-bind="ptm('menuitem', { activeDescendant: focused ? focusedOptionId : undefined })"
>
<li v-if="isItemVisible(item)" :id="`${id}_${index}`" :aria-controls="`${id}_item`" class="p-speeddial-item" :class="itemClass(`${id}_${index}`)" :style="getItemStyle(index)" role="menuitem" v-bind="ptm('menuitem')">
<template v-if="!$slots.item">
<a
v-tooltip:[tooltipOptions]="{ value: item.label, disabled: !tooltipOptions }"
Expand All @@ -45,7 +36,7 @@
:target="item.target"
@click="onItemClick($event, item)"
:aria-label="item.label"
v-bind="ptm('action', { activeDescendant: focused ? focusedOptionId : undefined })"
v-bind="ptm('action')"
>
<span v-if="item.icon" :class="['p-speeddial-action-icon', item.icon]" v-bind="ptm('actionIcon')"></span>
</a>
Expand Down

0 comments on commit aef0282

Please sign in to comment.