vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.3.9] Vuetify defaults provider: VListItem active class doesn't get applied

Open Dominic-Marcelino opened this issue 11 months ago • 2 comments

Environment

Vuetify Version: 3.3.9 Vue Version: 3.3.4 Browsers: Chrome 114.0.0.0 OS: Mac OS 10.15.7

Steps to reproduce

  • Define a default for VListItem --> activeClass and
  • Create a vList as a router --> class isn't applied
  • Add the "active-class" prop to the VListItem manually and it works

Expected Behavior

  • Default active class should be added

Actual Behavior

  • need to use the prop manually on the component

Reproduction Link

https://stackblitz.com/edit/vitejs-vite-vx9vtw?file=src%2Fmain.ts,src%2Fcomponents%2FNav.vue&terminal=dev

Other comments

(haven't tested if this also applies to activeClass props on other components)

Dominic-Marcelino avatar Jul 20 '23 13:07 Dominic-Marcelino

VList also provides it: https://github.com/vuetifyjs/vuetify/blob/87de862e11badbb8ab2b1f49ac67cd76db2837d3/packages/vuetify/src/components/VList/VList.tsx#L153-L154 Should defaults skip undefined like vue does?

KaelWD avatar Jul 20 '23 13:07 KaelWD

VList also provides it:

This indeed works as a workaround - thanks!

Should defaults skip undefined like vue does?

What exactly do you mean by this? I would expect to be able to define it on the lowest level component as with other props and components

Dominic-Marcelino avatar Jul 20 '23 13:07 Dominic-Marcelino