Skip to content

Commit

Permalink
fix(kbreadcrumb): misc fixes [KHCP-8969]
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM committed Mar 12, 2024
1 parent 97d0a38 commit aba4b04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/KBreadcrumbs/KBreadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:is="getComponentAttrs(item, idx === items.length - 1).type"
v-bind="getComponentAttrs(item, idx === items.length - 1).attrs"
class="breadcrumbs-item"
:class="{ 'link': !!item.to, 'active': idx === items.length - 1}"
:class="{ 'link': !!item.to && idx !== items.length - 1, 'active': idx === items.length - 1 }"
>
<span
v-if="$slots[`icon-${getBreadcrumbKey(item, idx)}`]"
Expand Down Expand Up @@ -69,7 +69,9 @@ const getComponentAttrs = (item: BreadcrumbItem, active: boolean) => {
if (!item.to || active) {
return {
type: 'div',
attrs: {},
attrs: {
title: item.title || item.text,
},
}
} else if (typeof item.to === 'object') {
return {
Expand Down

0 comments on commit aba4b04

Please sign in to comment.