Skip to content

Commit

Permalink
fix(vlistgroup): fixed icon not displaying using kebab-case with slot
Browse files Browse the repository at this point in the history
added prepend-icon and append-icon to slot.

fix vuetifyjs#8676
  • Loading branch information
louisdelphie committed Jun 14, 2022
1 parent 0243af8 commit 23fa978
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/vuetify/src/components/VList/VListGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,15 @@ export default baseMixins.extend<options>().extend({
genAppendIcon (): VNode | null {
const icon = !this.subGroup ? this.appendIcon : false

if (!icon && !this.$slots.appendIcon) return null
if (!icon && !this.$slots['append-icon'] && !this.$slots.appendIcon) return null

return this.$createElement(VListItemIcon, {
staticClass: 'v-list-group__header__append-icon',
}, [
this.$slots.appendIcon || this.genIcon(icon),
])
return this.$createElement(
VListItemIcon,
{
staticClass: 'v-list-group__header__append-icon',
},
[this.$slots['append-icon'] || this.$slots.appendIcon || this.genIcon(icon)]
)
},
genHeader (): VNode {
return this.$createElement(VListItem, {
Expand Down Expand Up @@ -177,12 +179,12 @@ export default baseMixins.extend<options>().extend({
? '$subgroup'
: this.prependIcon

if (!icon && !this.$slots.prependIcon) return null
if (!icon && !this.$slots['prepend-icon'] && !this.$slots.prependIcon) return null

return this.$createElement(VListItemIcon, {
staticClass: 'v-list-group__header__prepend-icon',
}, [
this.$slots.prependIcon || this.genIcon(icon),
this.$slots.prependIcon || this.$slots['prepend-icon'] || this.genIcon(icon),
])
},
onRouteChange (to: Route) {
Expand Down

0 comments on commit 23fa978

Please sign in to comment.